Class: SportDb::Parser::GroupDef
- Defined in:
- lib/sportdb/parser/parse_tree.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
-
#teams ⇒ Object
Returns the value of attribute teams.
Instance Method Summary collapse
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name
10 11 12 |
# File 'lib/sportdb/parser/parse_tree.rb', line 10 def name @name end |
#teams ⇒ Object
Returns the value of attribute teams
10 11 12 |
# File 'lib/sportdb/parser/parse_tree.rb', line 10 def teams @teams end |
Instance Method Details
#as_json ⇒ Object
12 13 14 15 16 |
# File 'lib/sportdb/parser/parse_tree.rb', line 12 def as_json(*) ["<GroupDef>", { 'name' => name.as_json, 'teams' => teams.as_json } ] end |
#pretty_print(q) ⇒ Object
18 19 20 21 22 23 24 |
# File 'lib/sportdb/parser/parse_tree.rb', line 18 def pretty_print( q ) q.group( 4, '<GroupDef ', '>' ) do ## group( indent, open, close) q.text( name ) q.text( " teams=" ) q.pp( teams ) end end |