Method: Rodbot::Refinements#constantize
- Defined in:
- lib/rodbot/refinements.rb
#constantize ⇒ Class, Module
Convert module or class path to module or class
29 30 31 32 33 |
# File 'lib/rodbot/refinements.rb', line 29 refine String do def constantize Module.const_get(self.split('/').map(&:camelize).join('::')) end end |