Class: Fbtxt::Parser::Sub
- Defined in:
- lib/fbtxt/parser/parse_tree-props.rb
Overview
fix-fix-fix change :sub to :lineup - why? why not?
Instance Attribute Summary collapse
-
#minute ⇒ Object
Returns the value of attribute minute.
-
#sub ⇒ Object
Returns the value of attribute sub.
Instance Method Summary collapse
Instance Attribute Details
#minute ⇒ Object
Returns the value of attribute minute
214 215 216 |
# File 'lib/fbtxt/parser/parse_tree-props.rb', line 214 def minute @minute end |
#sub ⇒ Object
Returns the value of attribute sub
214 215 216 |
# File 'lib/fbtxt/parser/parse_tree-props.rb', line 214 def sub @sub end |
Instance Method Details
#as_json ⇒ Object
215 216 217 218 219 220 221 |
# File 'lib/fbtxt/parser/parse_tree-props.rb', line 215 def as_json(*) h = { 'lineup' => sub.as_json } h['minute'] = minute.as_json if minute ## ['<Sub>', h] h # note - return "inline" json object (not tagged array with json object) end |
#pretty_print(q) ⇒ Object
223 224 225 226 227 228 |
# File 'lib/fbtxt/parser/parse_tree-props.rb', line 223 def pretty_print( q ) q.group( 0, '(', ')') do q.text( "#{minute.to_s} " ) if minute q.pp( sub ) end end |