Class: Treebis::BlockProbe

Inherits:
Object
  • Object
show all
Defined in:
lib/nandoc/support/treebis-extlib.rb

Overview

experimental additions to treebis

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#sexpObject (readonly)

Returns the value of attribute sexp.



12
13
14
# File 'lib/nandoc/support/treebis-extlib.rb', line 12

def sexp
  @sexp
end