Class: Module
Constant Summary collapse
- RUBY_VERSION_18 =
!!(RUBY_VERSION =~ /^1\.8/)
Instance Method Summary collapse
Instance Method Details
#const_get_if_defined(const) ⇒ Object
42 43 44 45 46 47 |
# File 'lib/card/core_ext.rb', line 42 def const_get_if_defined const args = RUBY_VERSION_18 ? [ const ] : [ const, false ] if const_defined? *args const_get *args end end |
#const_get_or_set(const) ⇒ Object
49 50 51 |
# File 'lib/card/core_ext.rb', line 49 def const_get_or_set const const_get_if_defined const or const_set const, yield end |