Class: Sports::NationalTeam

Inherits:
Team
  • Object
show all
Defined in:
lib/sportdb/structs/team.rb

Instance Attribute Summary

Attributes inherited from Team

#alt_names, #code, #country, #key, #name, #wikipedia, #year, #year_end

Instance Method Summary collapse

Methods inherited from Team

#historic?, #names, #wikipedia?, #wikipedia_url

Constructor Details

#initialize(**kwargs) ⇒ NationalTeam

Returns a new instance of NationalTeam.



83
84
85
# File 'lib/sportdb/structs/team.rb', line 83

def initialize( **kwargs )
  super
end

Instance Method Details

#pretty_print(printer) ⇒ Object



92
93
94
95
96
97
98
99
100
# File 'lib/sportdb/structs/team.rb', line 92

def pretty_print( printer )
  buf = String.new
  buf << "<NationalTeam: #{@name}"
  ## use code from country or from team ???

  buf << " (#{@code})"
  buf << ">"

  printer.text( buf )
end

#update(**kwargs) ⇒ Object



87
88
89
90
# File 'lib/sportdb/structs/team.rb', line 87

def update( **kwargs )
  super
  self   ## note - MUST return self for chaining

end