Class: PersistentTree::MapEnumeratorDecorator
- Inherits:
-
Object
- Object
- PersistentTree::MapEnumeratorDecorator
show all
- Defined in:
- lib/persistent_tree/map.rb
Instance Method Summary
collapse
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method_name, *args, &block) ⇒ Object
13
14
15
16
17
18
19
|
# File 'lib/persistent_tree/map.rb', line 13
def method_missing(method_name, *args, &block)
if @subject.respond_to? method_name
@subject.send method_name, *args, &block
else
super
end
end
|
Instance Method Details
#enumerator(subject) ⇒ Object
5
6
7
|
# File 'lib/persistent_tree/map.rb', line 5
def enumerator(subject)
@subject = subject
end
|
#respond_to_missing?(method_name, *args) ⇒ Boolean
9
10
11
|
# File 'lib/persistent_tree/map.rb', line 9
def respond_to_missing?(method_name, *args)
@subject.respond_to?(method_name) || super
end
|