Class: TExp::ParseCallback
- Inherits:
-
Object
- Object
- TExp::ParseCallback
- Defined in:
- lib/texp/parse.rb
Overview
Convenience class for creating parse callbacks.
Instance Method Summary collapse
-
#initialize(&block) ⇒ ParseCallback
constructor
A new instance of ParseCallback.
- #parse_callback(stack) ⇒ Object
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 |