module Tins::MethodMissingDelegator

This module contains a configurable method missing delegator and can be mixed into a module/class.

Attributes

method_missing_delegator[RW]

This object will be the receiver of all missing method calls, if it has a value other than nil.

Public Instance Methods

method_missing(id, *a, &b) click to toggle source

Delegates all missing method calls to method_missing_delegator if this attribute has been set. Otherwise it will call super.

Calls superclass method
# File lib/tins/dslkit.rb, line 503
def method_missing(id, *a, &b)
  unless method_missing_delegator.nil?
    method_missing_delegator.__send__(id, *a, &b)
  else
    super
  end
end