class StarTrekCLI::Series
Attributes
name[R]
seasons[R]
title_card[R]
Public Class Methods
all()
click to toggle source
# File lib/StarTrekCLI/series.rb, line 12 def self.all @@all end
find_series_by_name(series_name)
click to toggle source
# File lib/StarTrekCLI/series.rb, line 16 def self.find_series_by_name(series_name) @@all.find do |n| n.name == series_name end end
new(name)
click to toggle source
# File lib/StarTrekCLI/series.rb, line 6 def initialize(name) @name = name @seasons = [] @@all << self end
Public Instance Methods
season(season_number)
click to toggle source
NYI: url not fucking used, how is the url going to get to season.new?
# File lib/StarTrekCLI/series.rb, line 24 def season(season_number) @seasons[season_number] || StarTrekCLI::Season.new(self, season_number) end