Class: SportDb::MatchTree::Group
- Inherits:
-
Object
- Object
- SportDb::MatchTree::Group
- Defined in:
- lib/sportdb/quick/match_tree/group.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#teams ⇒ Object
readonly
Returns the value of attribute teams.
Instance Method Summary collapse
-
#initialize(name:, teams:) ⇒ Group
constructor
A new instance of Group.
- #pretty_print(printer) ⇒ Object
Constructor Details
#initialize(name:, teams:) ⇒ Group
Returns a new instance of Group.
7 8 9 10 11 |
# File 'lib/sportdb/quick/match_tree/group.rb', line 7 def initialize( name:, teams: ) @name = name @teams = teams end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
5 6 7 |
# File 'lib/sportdb/quick/match_tree/group.rb', line 5 def name @name end |
#teams ⇒ Object (readonly)
Returns the value of attribute teams.
5 6 7 |
# File 'lib/sportdb/quick/match_tree/group.rb', line 5 def teams @teams end |
Instance Method Details
#pretty_print(printer) ⇒ Object
13 14 15 16 17 18 19 20 |
# File 'lib/sportdb/quick/match_tree/group.rb', line 13 def pretty_print( printer ) buf = String.new buf << "<Group #{@name} " buf << @teams.pretty_print_inspect buf << ">" printer.text( buf ) end |