Module: Finitio::Syntax::Heading
- Defined in:
- lib/finitio/syntax/heading.rb
Instance Method Summary collapse
Instance Method Details
#attributes(factory) ⇒ Object
5 6 7 |
# File 'lib/finitio/syntax/heading.rb', line 5 def attributes(factory) captures[:attribute].map{|x| x.compile(factory) } end |
#compile(factory) ⇒ Object
9 10 11 |
# File 'lib/finitio/syntax/heading.rb', line 9 def compile(factory) Finitio::Heading.new(attributes(factory)) end |
#to_ast ⇒ Object
13 14 15 |
# File 'lib/finitio/syntax/heading.rb', line 13 def to_ast captures[:attribute].map(&:to_ast).unshift(:heading) end |