Module: ActiveSupport::QualifiedConstUtils

Defined in:
lib/active_support/core_ext/module/qualified_const.rb

Class Method Summary collapse

Class Method Details

.names(path) ⇒ Object



13
14
15
# File 'lib/active_support/core_ext/module/qualified_const.rb', line 13

def self.names(path)
  path.split('::')
end

.raise_if_absolute(path) ⇒ Object

Raises:



9
10
11
# File 'lib/active_support/core_ext/module/qualified_const.rb', line 9

def self.raise_if_absolute(path)
  raise NameError.new("wrong constant name #$&") if path =~ /\A::[^:]+/
end