Class: Trenni::ParseDelegate

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

Constructor Details

#initializeParseDelegate

Returns a new instance of ParseDelegate.



24
25
26
# File 'lib/trenni/parse_delegate.rb', line 24

def initialize
	@events = []
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(*args) ⇒ Object



30
31
32
# File 'lib/trenni/parse_delegate.rb', line 30

def method_missing(*args)
	@events << args
end

Instance Attribute Details

#eventsObject (readonly)

Returns the value of attribute events.



28
29
30
# File 'lib/trenni/parse_delegate.rb', line 28

def events
  @events
end