Module: NoBacksies::ConstMissing

Defined in:
lib/no_backsies.rb

Overview

Callback system for #const_missing.

Unlike other callback mixins, this does NOT invoke super (for obvious reasons).

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.append_features(base) ⇒ Object



343
344
345
346
# File 'lib/no_backsies.rb', line 343

def self.append_features(base)
  base.extend CallbackMethods
  base.extend self
end

Instance Method Details

#const_missing(const) ⇒ Object



349
350
351
352
353
354
355
# File 'lib/no_backsies.rb', line 349

def const_missing(const)
  if defined?(super)
    callback_invoke(:const_missing, const){ super(const) }
  else
    callback_invoke(:const_missing, const)
  end
end