aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib
diff options
context:
space:
mode:
authorSebastian Martinez <sebastian@wyeworks.com>2011-04-17 19:42:53 -0300
committerSebastian Martinez <sebastian@wyeworks.com>2011-04-17 19:42:53 -0300
commitceeed213a96d2f893838f9304b3953a1fc727cfc (patch)
treeceb2ccce7ccb4288c02b5aaf0a9761fcf5b925c2 /activesupport/lib
parentc49799923098b63e906af955dc077cb24caeb659 (diff)
downloadrails-ceeed213a96d2f893838f9304b3953a1fc727cfc.tar.gz
rails-ceeed213a96d2f893838f9304b3953a1fc727cfc.tar.bz2
rails-ceeed213a96d2f893838f9304b3953a1fc727cfc.zip
Documented Array#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 764d0666fd..d6f0056ba4 100644
--- a/activesupport/lib/active_support/core_ext/object/blank.rb
+++ b/activesupport/lib/active_support/core_ext/object/blank.rb
@@ -67,7 +67,12 @@ class TrueClass
end
end
-class Array #:nodoc:
+class Array
+ # An array is blank if it's empty
+ # For example:
+ #
+ # [].blank? => true
+ # [1,2,3].blank? => false
alias_method :blank?, :empty?
end