Module: Lite::Decorator::Delegator

Defined in:
lib/lite/decorator/delegator.rb

Class Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method_name, *args, **kwargs) ⇒ Object (private)



13
14
15
16
17
18
19
# File 'lib/lite/decorator/delegator.rb', line 13

def method_missing(method_name, *args, **kwargs, &)
  if respond_to_method?(method_name)
    decorator.send(method_name, *args, **kwargs, &)
  else
    super
  end
end

Class Method Details

.included(base) ⇒ Object



7
8
9
# File 'lib/lite/decorator/delegator.rb', line 7

def self.included(base)
  base.include Inference
end