diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2009-03-21 03:34:49 -0700 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2009-03-21 04:35:16 -0700 |
commit | bd28c7b1b8a569d431cc93924ad1ff5fdb59f401 (patch) | |
tree | 7384e6aa0802804c6f0989dded15d84e0a5c99ec /activesupport/lib/active_support | |
parent | 005b40194e9103f5c52434334b5f3b5028cbe813 (diff) | |
download | rails-bd28c7b1b8a569d431cc93924ad1ff5fdb59f401.tar.gz rails-bd28c7b1b8a569d431cc93924ad1ff5fdb59f401.tar.bz2 rails-bd28c7b1b8a569d431cc93924ad1ff5fdb59f401.zip |
blank? and duplicable? are Object extensions
Diffstat (limited to 'activesupport/lib/active_support')
-rw-r--r-- | activesupport/lib/active_support/core_ext/object.rb | 3 | ||||
-rw-r--r-- | activesupport/lib/active_support/core_ext/object/blank.rb (renamed from activesupport/lib/active_support/core_ext/blank.rb) | 2 | ||||
-rw-r--r-- | activesupport/lib/active_support/core_ext/object/duplicable.rb (renamed from activesupport/lib/active_support/core_ext/duplicable.rb) | 0 |
3 files changed, 4 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/core_ext/object.rb b/activesupport/lib/active_support/core_ext/object.rb index 0796a7b710..31a1526674 100644 --- a/activesupport/lib/active_support/core_ext/object.rb +++ b/activesupport/lib/active_support/core_ext/object.rb @@ -1,3 +1,6 @@ +require 'active_support/core_ext/object/blank' +require 'active_support/core_ext/object/duplicable' + require 'active_support/core_ext/object/conversions' require 'active_support/core_ext/object/extending' require 'active_support/core_ext/object/instance_variables' diff --git a/activesupport/lib/active_support/core_ext/blank.rb b/activesupport/lib/active_support/core_ext/object/blank.rb index 4f8dc4e281..9a1f663bf3 100644 --- a/activesupport/lib/active_support/core_ext/blank.rb +++ b/activesupport/lib/active_support/core_ext/object/blank.rb @@ -12,7 +12,7 @@ class Object def blank? respond_to?(:empty?) ? empty? : !self end - + # An object is present if it's not blank. def present? !blank? diff --git a/activesupport/lib/active_support/core_ext/duplicable.rb b/activesupport/lib/active_support/core_ext/object/duplicable.rb index 8f49ddfd9e..8f49ddfd9e 100644 --- a/activesupport/lib/active_support/core_ext/duplicable.rb +++ b/activesupport/lib/active_support/core_ext/object/duplicable.rb |