module Frubby::ConstMissing

Public Instance Methods

const_missing(const) click to toggle source
Calls superclass method
# File lib/frubby/const_missing.rb, line 3
def const_missing(const)
  _constants = Object.constants + constants
  _constant = FuzzyMatch.new(_constants).find(const)
  
  warn "[frubby] const_missing: #{const} -> #{_constant}" if $DEBUG

  _constant ? const_get(_constant) : super
end