Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/dm-translatable.rb
Instance Method Summary collapse
Instance Method Details
#constantize ⇒ Object
5 6 7 8 9 |
# File 'lib/dm-translatable.rb', line 5 def constantize self.split("::").tap do |s| s.shift if s.first.empty? end.inject(Module) {|acc, val| acc.const_get(val)} end |