mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Doc fixes [ci skip]
This commit is contained in:
parent
ed1ff198f8
commit
69db8dc468
4 changed files with 4 additions and 4 deletions
|
@ -1,5 +1,5 @@
|
|||
class Hash
|
||||
# Slice a hash to include only the given keys. Returns a hash containing
|
||||
# Slices a hash to include only the given keys. Returns a hash containing
|
||||
# the given keys.
|
||||
#
|
||||
# { a: 1, b: 2, c: 3, d: 4 }.slice(:a, :b)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
class String
|
||||
# Enable more predictable duck-typing on String-like classes. See <tt>Object#acts_like?</tt>.
|
||||
# Enables more predictable duck-typing on String-like classes. See <tt>Object#acts_like?</tt>.
|
||||
def acts_like_string?
|
||||
true
|
||||
end
|
||||
|
|
|
@ -178,7 +178,7 @@ class String
|
|||
ActiveSupport::Inflector.tableize(self)
|
||||
end
|
||||
|
||||
# Create a class name from a plural table name like Rails does for table names to models.
|
||||
# Creates a class name from a plural table name like Rails does for table names to models.
|
||||
# Note that this returns a string and not a class. (To convert to an actual class
|
||||
# follow +classify+ with +constantize+.)
|
||||
#
|
||||
|
|
|
@ -35,7 +35,7 @@ class String
|
|||
ActiveSupport::Multibyte.proxy_class.new(self)
|
||||
end
|
||||
|
||||
# Return +true+ if string has utf_8 encoding.
|
||||
# Returns +true+ if string has utf_8 encoding.
|
||||
#
|
||||
# utf_8_str = "some string".encode "UTF-8"
|
||||
# iso_str = "some string".encode "ISO-8859-1"
|
||||
|
|
Loading…
Reference in a new issue