Class: Fbtxt::Parser::Heading2
- Defined in:
- lib/fbtxt/parser/parse_tree.rb
Overview
Heading1
Instance Attribute Summary collapse
-
#text ⇒ Object
Returns the value of attribute text.
Instance Method Summary collapse
Instance Attribute Details
#text ⇒ Object
Returns the value of attribute text
176 177 178 |
# File 'lib/fbtxt/parser/parse_tree.rb', line 176 def text @text end |
Instance Method Details
#as_json ⇒ Object
177 178 179 |
# File 'lib/fbtxt/parser/parse_tree.rb', line 177 def as_json(*) ['<Heading2>', { 'text' => text.as_json }] end |
#pretty_print(q) ⇒ Object
181 182 183 184 185 |
# File 'lib/fbtxt/parser/parse_tree.rb', line 181 def pretty_print( q ) q.group( 4, '<Heading2 ', '>' ) do q.text( text ) end end |