Module: QualifiedConstUtils
- Defined in:
- lib/active_support/core_ext/module/qualified_const.rb
Overview
– Allows code reuse in the methods below without polluting Module. ++
Class Method Summary collapse
Class Method Details
.names(path) ⇒ Object
11 12 13 |
# File 'lib/active_support/core_ext/module/qualified_const.rb', line 11 def self.names(path) path.split('::') end |
.raise_if_absolute(path) ⇒ Object
7 8 9 |
# File 'lib/active_support/core_ext/module/qualified_const.rb', line 7 def self.raise_if_absolute(path) raise NameError, "wrong constant name #$&" if path =~ /\A::[^:]+/ end |