mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
removed colons from a few Example headers
This commit is contained in:
@@ -31,7 +31,7 @@ module ActiveSupport #:nodoc:
|
||||
#
|
||||
# This method is aliased to <tt>to_s</tt>.
|
||||
#
|
||||
# ==== Examples:
|
||||
# ==== Examples
|
||||
# date = Date.new(2007, 11, 10) # => Sat, 10 Nov 2007
|
||||
#
|
||||
# date.to_formatted_s(:db) # => "2007-11-10"
|
||||
@@ -76,7 +76,7 @@ module ActiveSupport #:nodoc:
|
||||
# Converts a Date instance to a Time, where the time is set to the beginning of the day.
|
||||
# The timezone can be either :local or :utc (default :local).
|
||||
#
|
||||
# ==== Examples:
|
||||
# ==== Examples
|
||||
# date = Date.new(2007, 11, 10) # => Sat, 10 Nov 2007
|
||||
#
|
||||
# date.to_time # => Sat Nov 10 00:00:00 0800 2007
|
||||
@@ -90,7 +90,7 @@ module ActiveSupport #:nodoc:
|
||||
# Converts a Date instance to a DateTime, where the time is set to the beginning of the day
|
||||
# and UTC offset is set to 0.
|
||||
#
|
||||
# ==== Example:
|
||||
# ==== Examples
|
||||
# date = Date.new(2007, 11, 10) # => Sat, 10 Nov 2007
|
||||
#
|
||||
# date.to_datetime # => Sat, 10 Nov 2007 00:00:00 0000
|
||||
|
||||
@@ -25,7 +25,7 @@ module ActiveSupport #:nodoc:
|
||||
#
|
||||
# This method is aliased to <tt>to_s</tt>.
|
||||
#
|
||||
# === Examples:
|
||||
# === Examples
|
||||
# datetime = DateTime.civil(2007, 12, 4, 0, 0, 0, 0) # => Tue, 04 Dec 2007 00:00:00 +0000
|
||||
#
|
||||
# datetime.to_formatted_s(:db) # => "2007-12-04 00:00:00"
|
||||
|
||||
@@ -75,7 +75,7 @@ module ActiveSupport #:nodoc:
|
||||
# Converts a hash into a string suitable for use as a URL query string. An optional <tt>namespace</tt> can be
|
||||
# passed to enclose the param names (see example below).
|
||||
#
|
||||
# ==== Example:
|
||||
# ==== Examples
|
||||
# { :name => 'David', :nationality => 'Danish' }.to_query # => "name=David&nationality=Danish"
|
||||
#
|
||||
# { :name => 'David', :nationality => 'Danish' }.to_query('user') # => "user%5Bname%5D=David&user%5Bnationality%5D=Danish"
|
||||
|
||||
@@ -38,7 +38,7 @@ module ActiveSupport #:nodoc:
|
||||
# Note that keys are NOT treated indifferently, meaning if you use strings for keys but assert symbols
|
||||
# as keys, this will fail.
|
||||
#
|
||||
# ==== Examples:
|
||||
# ==== Examples
|
||||
# { :name => "Rob", :years => "28" }.assert_valid_keys(:name, :age) # => raises "ArgumentError: Unknown key(s): years"
|
||||
# { :name => "Rob", :age => "28" }.assert_valid_keys("name", "age") # => raises "ArgumentError: Unknown key(s): name, age"
|
||||
# { :name => "Rob", :age => "28" }.assert_valid_keys(:name, :age) # => passes, raises nothing
|
||||
|
||||
@@ -15,7 +15,7 @@ module ActiveSupport #:nodoc:
|
||||
end
|
||||
# Gives a human readable format of the range.
|
||||
#
|
||||
# ==== Example:
|
||||
# ==== Example
|
||||
#
|
||||
# [1..100].to_formatted_s # => "1..100"
|
||||
def to_formatted_s(format = :default)
|
||||
|
||||
@@ -2,7 +2,7 @@ class Date
|
||||
# Returns a JSON string representing the date. If ActiveSupport.use_standard_json_time_format is set to true, the
|
||||
# ISO 8601 format is used.
|
||||
#
|
||||
# ==== Examples:
|
||||
# ==== Examples
|
||||
#
|
||||
# # With ActiveSupport.use_standard_json_time_format = true
|
||||
# Date.new(2005,2,1).to_json
|
||||
|
||||
@@ -2,7 +2,7 @@ class DateTime
|
||||
# Returns a JSON string representing the datetime. If ActiveSupport.use_standard_json_time_format is set to true, the
|
||||
# ISO 8601 format is used.
|
||||
#
|
||||
# ==== Examples:
|
||||
# ==== Examples
|
||||
#
|
||||
# # With ActiveSupport.use_standard_json_time_format = true
|
||||
# DateTime.civil(2005,2,1,15,15,10).to_json
|
||||
|
||||
@@ -2,7 +2,7 @@ class Time
|
||||
# Returns a JSON string representing the time. If ActiveSupport.use_standard_json_time_format is set to true, the
|
||||
# ISO 8601 format is used.
|
||||
#
|
||||
# ==== Examples:
|
||||
# ==== Examples
|
||||
#
|
||||
# # With ActiveSupport.use_standard_json_time_format = true
|
||||
# Time.utc(2005,2,1,15,15,10).to_json
|
||||
|
||||
@@ -111,7 +111,7 @@ module ActiveSupport
|
||||
# Returns a JSON string representing the TimeWithZone. If ActiveSupport.use_standard_json_time_format is set to
|
||||
# true, the ISO 8601 format is used.
|
||||
#
|
||||
# ==== Examples:
|
||||
# ==== Examples
|
||||
#
|
||||
# # With ActiveSupport.use_standard_json_time_format = true
|
||||
# Time.utc(2005,2,1,15,15,10).in_time_zone.to_json
|
||||
|
||||
Reference in New Issue
Block a user