Class: ScoreScraper::Team

Inherits:
Object
  • Object
show all
Defined in:
lib/score_scraper/team.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attrs) ⇒ Team

Returns a new instance of Team.



5
6
7
8
9
10
# File 'lib/score_scraper/team.rb', line 5

def initialize(attrs)
  @city         = attrs[:city] || ''
  @nickname     = attrs[:nickname] || ''
  @abbreviation = attrs[:abbreviation] || 'NIL'
  @score        = attrs[:score] || 0
end

Instance Attribute Details

#abbreviationObject (readonly)

Returns the value of attribute abbreviation.



3
4
5
# File 'lib/score_scraper/team.rb', line 3

def abbreviation
  @abbreviation
end

#cityObject (readonly)

Returns the value of attribute city.



3
4
5
# File 'lib/score_scraper/team.rb', line 3

def city
  @city
end

#nicknameObject (readonly)

Returns the value of attribute nickname.



3
4
5
# File 'lib/score_scraper/team.rb', line 3

def nickname
  @nickname
end

#scoreObject (readonly)

Returns the value of attribute score.



3
4
5
# File 'lib/score_scraper/team.rb', line 3

def score
  @score
end