module Jackal::Utils::Constants
Public Instance Methods
constantize(string)
click to toggle source
Provide constant defined by string
@param string [String] constant to locate @return [Class]
# File lib/jackal/utils/constants.rb, line 11 def constantize(string) klass = string.to_s.split('::').inject(Object) do |memo, name| memo.const_get(name) end end