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
243 244 245 |
# File 'lib/fbtxt/parser/parse_tree-props.rb', line 243 def minute @minute end |
#sub ⇒ Object
Returns the value of attribute sub
243 244 245 |
# File 'lib/fbtxt/parser/parse_tree-props.rb', line 243 def sub @sub end |
Instance Method Details
#as_json ⇒ Object
244 245 246 247 248 249 250 |
# File 'lib/fbtxt/parser/parse_tree-props.rb', line 244 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
252 253 254 255 256 257 |
# File 'lib/fbtxt/parser/parse_tree-props.rb', line 252 def pretty_print( q ) q.group( 0, '(', ')') do q.text( "#{minute.to_s} " ) if minute q.pp( sub ) end end |