Class: TheTvDbParty::FullSeriesRecord

Inherits:
BaseSeriesRecord show all
Defined in:
lib/thetvdb_party/fullseriesrecord.rb

Instance Attribute Summary collapse

Attributes inherited from BaseSeriesRecord

#actors, #added, #addedby, #airs_dayofweek, #airs_time, #bannerpath_full, #bannerpath_relative, #client, #contentrating, #fanartpath_full, #fanartpath_relative, #firstaired, #genres, #imdb_id, #language, #lastupdated, #network, #networkid, #overview, #posterpath_full, #posterpath_relative, #rating, #ratingcount, #runtime, #seriesid, #seriesname, #status, #tvcom_id, #zap2it_id

Instance Method Summary collapse

Methods inherited from BaseSeriesRecord

#get_absolute_episode, #get_actors, #get_banners, #get_dvd_season_episode, #get_full_series_record, #get_season_episode

Constructor Details

#initialize(client, hashValues) ⇒ FullSeriesRecord


6
7
8
9
10
11
12
13
14
15
16
17
18
# File 'lib/thetvdb_party/fullseriesrecord.rb', line 6

def initialize(client, hashValues)
  super client, hashValues["Series"]

  episodesHashValue = hashValues["Episode"]
  case episodesHashValue
    when Array
      @episodes = episodesHashValue.map { |episodeHashValues| BaseEpisodeRecord.new client, episodeHashValues }
    when Hash
      @episodes = [ BaseEpisodeRecord.new(client, episodesHashValue) ]
    else
      @episodes = []
  end
end

Instance Attribute Details

#episodesObject (readonly)

Returns the value of attribute episodes


4
5
6
# File 'lib/thetvdb_party/fullseriesrecord.rb', line 4

def episodes
  @episodes
end