Module: Tins::MethodMissingDelegator::DelegatorModule

Includes:
Tins::MethodMissingDelegator
Included in:
DelegatorClass
Defined in:
lib/tins/dslkit.rb

Overview

Including this module in your classes makes an initialize method available, whose first argument is used as method_missing_delegator attribute. If a superior initialize method was defined it is called with all arguments but the first.

Instance Attribute Summary

Attributes included from Tins::MethodMissingDelegator

#method_missing_delegator

Instance Method Summary collapse

Methods included from Tins::MethodMissingDelegator

#method_missing

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Tins::MethodMissingDelegator

Instance Method Details

#initialize(delegator, *a, &b) ⇒ Object



505
506
507
508
# File 'lib/tins/dslkit.rb', line 505

def initialize(delegator, *a, &b)
  self.method_missing_delegator = delegator
  super(*a, &b) if defined? super
end