class AhlScraper::SeasonListItem
Public Class Methods
new(raw_data)
click to toggle source
# File lib/ahl_scraper/resources/season_list_item.rb, line 5 def initialize(raw_data) @raw_data = raw_data end
Public Instance Methods
id()
click to toggle source
# File lib/ahl_scraper/resources/season_list_item.rb, line 9 def id @id ||= @raw_data[:id].to_i end
name()
click to toggle source
# File lib/ahl_scraper/resources/season_list_item.rb, line 13 def name @name ||= @raw_data[:name] end
season_type()
click to toggle source
# File lib/ahl_scraper/resources/season_list_item.rb, line 17 def season_type case name when /Regular/ :regular when /All-Star/ :all_star when /Playoffs/ :playoffs when /Exhibition/ :exhibition end end