Method: String#deep_const_get

Defined in:
lib/socialization/helpers/string.rb

#deep_const_getObject



3
4
5
6
7
8
9
10
11
# File 'lib/socialization/helpers/string.rb', line 3

def deep_const_get
  result = nil
  path = self.clone.split("::")

  path.each do |p|
    result = (result || Kernel).const_get(p)
  end
  result
end