Module: Kernel
- Defined in:
- lib/frbr.rb
Class Method Summary collapse
Class Method Details
.constant(const) ⇒ Object
16 17 18 19 20 |
# File 'lib/frbr.rb', line 16 def self.constant(const) const = const.to_s.dup base = const.sub!(/^::/, '') ? Object : ( self.kind_of?(Module) ? self : self.class ) const.split(/::/).inject(base){ |mod, name| mod.const_get(name) } end |