1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

docs formatting changes

This commit is contained in:
Vijay Dev 2011-09-01 01:35:28 +05:30
parent cfd785f910
commit 752d74f952
3 changed files with 4 additions and 4 deletions

View file

@ -97,7 +97,7 @@ module Enumerable
end
# Returns true if the enumerable has more than 1 element. Functionally equivalent to enum.to_a.size > 1.
# Can be called with a block too, much like any?, so people.many? { |p| p.age > 26 } returns true if more than 1 person is over 26.
# Can be called with a block too, much like any?, so <tt>people.many? { |p| p.age > 26 }</tt> returns true if more than one person is over 26.
def many?
cnt = 0
if block_given?
@ -110,7 +110,7 @@ module Enumerable
end
end
# The negative of the Enumerable#include?. Returns true if the collection does not include the object.
# The negative of the <tt>Enumerable#include?</tt>. Returns true if the collection does not include the object.
def exclude?(object)
!include?(object)
end

View file

@ -2,7 +2,7 @@ require 'active_support/hash_with_indifferent_access'
class Hash
# Returns an +ActiveSupport::HashWithIndifferentAccess+ out of its receiver:
# Returns an <tt>ActiveSupport::HashWithIndifferentAccess</tt> out of its receiver:
#
# {:a => 1}.with_indifferent_access["a"] # => 1
#

View file

@ -112,7 +112,7 @@ module ActiveSupport
end
end
# Merges the instantized and the specified hashes together, giving precedence to the values from the second hash
# Merges the instantized and the specified hashes together, giving precedence to the values from the second hash.
# Does not overwrite the existing hash.
def merge(hash)
self.dup.update(hash)