Class: SportDb::MatchTree::Group

Inherits:
Object
  • Object
show all
Defined in:
lib/sportdb/quick/match_tree/group.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#nameObject (readonly)

Returns the value of attribute name.



5
6
7
# File 'lib/sportdb/quick/match_tree/group.rb', line 5

def name
  @name
end

#teamsObject (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