Module: ModuleExt::QualifiedConst::QualifiedConstUtils
- Defined in:
- lib/active_support/refinements/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
12 13 14 |
# File 'lib/active_support/refinements/core_ext/module/qualified_const.rb', line 12 def self.names(path) path.split('::') end |
.raise_if_absolute(path) ⇒ Object
8 9 10 |
# File 'lib/active_support/refinements/core_ext/module/qualified_const.rb', line 8 def self.raise_if_absolute(path) raise NameError.new("wrong constant name #$&") if path =~ /\A::[^:]+/ end |