aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib
diff options
context:
space:
mode:
authorSebastian Martinez <sebastian@wyeworks.com>2011-04-17 19:44:34 -0300
committerSebastian Martinez <sebastian@wyeworks.com>2011-04-17 19:44:34 -0300
commitb14b058be863e5a557191c9b403cc7ebc77951c9 (patch)
treef7de91349658a27dff56d4ef746a441f35bd1f49 /activesupport/lib
parentceeed213a96d2f893838f9304b3953a1fc727cfc (diff)
downloadrails-b14b058be863e5a557191c9b403cc7ebc77951c9.tar.gz
rails-b14b058be863e5a557191c9b403cc7ebc77951c9.tar.bz2
rails-b14b058be863e5a557191c9b403cc7ebc77951c9.zip
Documented Hash#blank?
Diffstat (limited to 'activesupport/lib')
-rw-r--r--activesupport/lib/active_support/core_ext/object/blank.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/core_ext/object/blank.rb b/activesupport/lib/active_support/core_ext/object/blank.rb
index d6f0056ba4..8cef3e87ea 100644
--- a/activesupport/lib/active_support/core_ext/object/blank.rb
+++ b/activesupport/lib/active_support/core_ext/object/blank.rb
@@ -76,7 +76,12 @@ class Array
alias_method :blank?, :empty?
end
-class Hash #:nodoc:
+class Hash
+ # A hash is blank if it's empty
+ # For example:
+ #
+ # {}.blank? => true
+ # {:key => 'value'}.blank? => false
alias_method :blank?, :empty?
end