Class: SportDb::Parser::DateHeaderLegs
- Defined in:
- lib/sportdb/parser/parse_tree.rb
Instance Attribute Summary collapse
-
#date1 ⇒ Object
Returns the value of attribute date1.
-
#date2 ⇒ Object
Returns the value of attribute date2.
Instance Method Summary collapse
Instance Attribute Details
#date1 ⇒ Object
Returns the value of attribute date1
84 85 86 |
# File 'lib/sportdb/parser/parse_tree.rb', line 84 def date1 @date1 end |
#date2 ⇒ Object
Returns the value of attribute date2
84 85 86 |
# File 'lib/sportdb/parser/parse_tree.rb', line 84 def date2 @date2 end |
Instance Method Details
#as_json ⇒ Object
86 87 88 89 90 91 |
# File 'lib/sportdb/parser/parse_tree.rb', line 86 def as_json(*) ['<DateHeaderLegs>', { 'leg1' => date1.as_json, 'leg2' => date2.as_json, } ] end |
#pretty_print(q) ⇒ Object
93 94 95 96 97 98 99 100 |
# File 'lib/sportdb/parser/parse_tree.rb', line 93 def pretty_print( q ) q.group( 4, '<DateHeaderLegs ', '>' ) do q.text( "leg1=" ) q.pp( date1 ) q.text( " leg2=" ) q.pp( date2 ) end end |