blank? and duplicable? are Object extensions

This commit is contained in:
Jeremy Kemper
2009-03-21 03:34:49 -07:00
parent 005b40194e
commit bd28c7b1b8
3 changed files with 4 additions and 1 deletions

View File

@@ -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'

View File

@@ -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?