Module: Eco::Language::Methods::DelegateMissing
Instance Method Summary
collapse
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method_name, *args, **kargs, &block) ⇒ Object
9
10
11
12
|
# File 'lib/eco/language/methods/delegate_missing.rb', line 9
def method_missing(method_name, *args, **kargs, &block)
super unless receiver = object_missing_delegated_to
receiver.send(method_name, *args, **kargs, &block)
end
|
Instance Method Details
#delegate_missing_to(meth) ⇒ Object
5
6
7
|
# File 'lib/eco/language/methods/delegate_missing.rb', line 5
def delegate_missing_to(meth)
@delegate_missing_to = meth
end
|
#respond_to_missing?(method_name, include_private = false) ⇒ Boolean
14
15
16
|
# File 'lib/eco/language/methods/delegate_missing.rb', line 14
def respond_to_missing?(method_name, include_private = false)
super
end
|