Class: TExp::ParseCallback

Inherits:
Object
  • Object
show all
Defined in:
lib/texp/parse.rb

Overview

Convenience class for creating parse callbacks.

Instance Method Summary collapse

Constructor Details

#initialize(&block) ⇒ ParseCallback

Returns a new instance of ParseCallback.



67
68
69
# File 'lib/texp/parse.rb', line 67

def initialize(&block)
  @callback = block
end

Instance Method Details

#parse_callback(stack) ⇒ Object



70
71
72
# File 'lib/texp/parse.rb', line 70

def parse_callback(stack)
  @callback.call(stack)
end