Module: SgfGrammar::Node1
- Defined in:
- lib/grammar/sgf-grammar.rb
Instance Method Summary collapse
Instance Method Details
#get(e) ⇒ Object
27 28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/grammar/sgf-grammar.rb', line 27 def get(e) a = [] if !e.nil? e.each do |el| if el.respond_to?(:value) a << el.value else a += get(el.elements) if !el.nil? end end end a end |
#value ⇒ Object
23 24 25 |
# File 'lib/grammar/sgf-grammar.rb', line 23 def value get([elements[2]]) end |