Class: Treebis::BlockProbe
- Inherits:
-
Object
- Object
- Treebis::BlockProbe
- Defined in:
- lib/nandoc/support/treebis-extlib.rb
Overview
experimental additions to treebis
Instance Attribute Summary collapse
-
#sexp ⇒ Object
readonly
Returns the value of attribute sexp.
Instance Method Summary collapse
-
#initialize(&block) ⇒ BlockProbe
constructor
if needed, etc.
- #method_missing(name, *args) ⇒ Object
Constructor Details
#initialize(&block) ⇒ BlockProbe
if needed, etc
8 9 10 11 |
# File 'lib/nandoc/support/treebis-extlib.rb', line 8 def initialize(&block) @sexp = [] instance_eval(&block) end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name, *args) ⇒ Object
13 14 15 16 17 |
# File 'lib/nandoc/support/treebis-extlib.rb', line 13 def method_missing name, *args record = [name, *args] @sexp.push record nil end |
Instance Attribute Details
#sexp ⇒ Object (readonly)
Returns the value of attribute sexp.
12 13 14 |
# File 'lib/nandoc/support/treebis-extlib.rb', line 12 def sexp @sexp end |