diff options
author | Sebastian Martinez <sebastian@wyeworks.com> | 2011-04-17 19:44:34 -0300 |
---|---|---|
committer | Sebastian Martinez <sebastian@wyeworks.com> | 2011-04-17 19:44:34 -0300 |
commit | b14b058be863e5a557191c9b403cc7ebc77951c9 (patch) | |
tree | f7de91349658a27dff56d4ef746a441f35bd1f49 /activesupport/lib/active_support | |
parent | ceeed213a96d2f893838f9304b3953a1fc727cfc (diff) | |
download | rails-b14b058be863e5a557191c9b403cc7ebc77951c9.tar.gz rails-b14b058be863e5a557191c9b403cc7ebc77951c9.tar.bz2 rails-b14b058be863e5a557191c9b403cc7ebc77951c9.zip |
Documented Hash#blank?
Diffstat (limited to 'activesupport/lib/active_support')
-rw-r--r-- | activesupport/lib/active_support/core_ext/object/blank.rb | 7 |
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 |