diff options
Diffstat (limited to 'activesupport/lib/active_support/core_ext')
-rw-r--r-- | activesupport/lib/active_support/core_ext/class/delegating_attributes.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/core_ext/class/delegating_attributes.rb b/activesupport/lib/active_support/core_ext/class/delegating_attributes.rb index f5f0ef8779..368317df9b 100644 --- a/activesupport/lib/active_support/core_ext/class/delegating_attributes.rb +++ b/activesupport/lib/active_support/core_ext/class/delegating_attributes.rb @@ -19,6 +19,12 @@ class Class def #{name} self.class.#{name} end + def self.#{name}? + !!#{name} + end + def #{name}? + !!#{name} + end EOS end end @@ -37,4 +43,4 @@ class Class superclass_delegating_reader(*names) superclass_delegating_writer(*names) end -end
\ No newline at end of file +end |