Module: Tcl::Delegator
- Included in:
- Proc, Var
- Defined in:
- lib/tcl/delegator.rb
Class Method Summary
collapse
Instance Method Summary
collapse
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name) ⇒ Object
9
10
11
|
# File 'lib/tcl/delegator.rb', line 9
def method_missing(name, ...)
interp.respond_to?(name) ? interp.send(name, ...) : super
end
|
Class Method Details
.included(klass) ⇒ Object
3
4
5
6
7
|
# File 'lib/tcl/delegator.rb', line 3
def self.included(klass)
klass.class_eval do
attr_reader :interp
end
end
|
Instance Method Details
#respond_to_missing?(name, include_private = false) ⇒ Boolean
13
14
15
|
# File 'lib/tcl/delegator.rb', line 13
def respond_to_missing?(name, include_private = false)
interp.respond_to?(name, include_private) || super
end
|