Class: SportDb::Import::TeamReader::Team

Inherits:
Object
  • Object
show all
Defined in:
lib/sportdb/config/team_reader.rb

Overview

note: use our own (internal) team struct for now - why? why not?

- check that shape/structure/fields/attributes match
  the Team struct in sportdb-text (in SportDb::Struct::Team)  !!!!

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeTeam

Returns a new instance of Team.



25
26
27
28
# File 'lib/sportdb/config/team_reader.rb', line 25

def initialize
  @alt_names = []
  @year_end  = nil
end

Instance Attribute Details

#alt_namesObject

todo: use just names for alt_names - why? why not?



16
17
18
# File 'lib/sportdb/config/team_reader.rb', line 16

def alt_names
  @alt_names
end

#cityObject

todo: use just names for alt_names - why? why not?



16
17
18
# File 'lib/sportdb/config/team_reader.rb', line 16

def city
  @city
end

#districtObject

more attribs - todo/fix - also add “upstream” to struct & model!!!!!



19
20
21
# File 'lib/sportdb/config/team_reader.rb', line 19

def district
  @district
end

#geosObject

more attribs - todo/fix - also add “upstream” to struct & model!!!!!



19
20
21
# File 'lib/sportdb/config/team_reader.rb', line 19

def geos
  @geos
end

#groundObject

todo: use just names for alt_names - why? why not?



16
17
18
# File 'lib/sportdb/config/team_reader.rb', line 16

def ground
  @ground
end

#nameObject

todo: use just names for alt_names - why? why not?



16
17
18
# File 'lib/sportdb/config/team_reader.rb', line 16

def name
  @name
end

#yearObject

todo: use just names for alt_names - why? why not?



16
17
18
# File 'lib/sportdb/config/team_reader.rb', line 16

def year
  @year
end

#year_endObject

more attribs - todo/fix - also add “upstream” to struct & model!!!!!



19
20
21
# File 'lib/sportdb/config/team_reader.rb', line 19

def year_end
  @year_end
end

Instance Method Details

#historic?Boolean Also known as: past?

Returns:

  • (Boolean)


21
# File 'lib/sportdb/config/team_reader.rb', line 21

def historic?()  @year_end.nil? == false; end