Class: ScoreScraper::Team
- Inherits:
-
Object
- Object
- ScoreScraper::Team
- Defined in:
- lib/score_scraper/team.rb
Instance Attribute Summary collapse
-
#abbreviation ⇒ Object
readonly
Returns the value of attribute abbreviation.
-
#city ⇒ Object
readonly
Returns the value of attribute city.
-
#nickname ⇒ Object
readonly
Returns the value of attribute nickname.
-
#score ⇒ Object
readonly
Returns the value of attribute score.
Instance Method Summary collapse
-
#initialize(attrs) ⇒ Team
constructor
A new instance of Team.
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
#abbreviation ⇒ Object (readonly)
Returns the value of attribute abbreviation.
3 4 5 |
# File 'lib/score_scraper/team.rb', line 3 def abbreviation @abbreviation end |
#city ⇒ Object (readonly)
Returns the value of attribute city.
3 4 5 |
# File 'lib/score_scraper/team.rb', line 3 def city @city end |
#nickname ⇒ Object (readonly)
Returns the value of attribute nickname.
3 4 5 |
# File 'lib/score_scraper/team.rb', line 3 def nickname @nickname end |
#score ⇒ Object (readonly)
Returns the value of attribute score.
3 4 5 |
# File 'lib/score_scraper/team.rb', line 3 def score @score end |