class Kamaze::Project::Helper::Inflector
Inflector
built on top of “Dry::Inflector“
Public Instance Methods
resolve(loadable)
click to toggle source
Load constant from a loadable/requirable path
@param [String] loadable @return [Object]
@raise LoadError @raise TypeError
# File lib/kamaze/project/helper/inflector.rb, line 20 def resolve(loadable) (loadable.to_s.empty? ? nil : loadable.to_s).yield_self do |f| require f self.constantize(self.classify(f)) end end