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.



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

#eventsObject (readonly)

Returns the value of attribute events.



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

def events
  @events
end