Class: Trenni::ParseDelegate
- Inherits:
-
Object
- Object
- Trenni::ParseDelegate
- Defined in:
- lib/trenni/parse_delegate.rb
Overview
This is a sample delegate for capturing all events. It’s only use is for testing.
Instance Attribute Summary collapse
-
#events ⇒ Object
readonly
Returns the value of attribute events.
Instance Method Summary collapse
-
#initialize ⇒ ParseDelegate
constructor
A new instance of ParseDelegate.
- #method_missing(*args) ⇒ Object
Constructor Details
#initialize ⇒ ParseDelegate
Returns a new instance of ParseDelegate.
26 27 28 |
# File 'lib/trenni/parse_delegate.rb', line 26 def initialize @events = [] end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(*args) ⇒ Object
32 33 34 |
# File 'lib/trenni/parse_delegate.rb', line 32 def method_missing(*args) @events << args end |
Instance Attribute Details
#events ⇒ Object (readonly)
Returns the value of attribute events.
30 31 32 |
# File 'lib/trenni/parse_delegate.rb', line 30 def events @events end |