Class: TvdbParty::Episode

Inherits:
Object
  • Object
show all
Defined in:
lib/tvdb_party/episode.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Episode

Returns a new instance of Episode.



5
6
7
8
9
10
11
12
13
14
15
16
# File 'lib/tvdb_party/episode.rb', line 5

def initialize(options={})
  @id = options["id"]
  @season_number = options["SeasonNumber"]
  @number = options["EpisodeNumber"]
  @name = options["EpisodeName"]
  @overview = options["Overview"]
  @air_date = Date.parse(options["FirstAired"])
  @thumb = "http://thetvdb.com/banners/" + options["filename"] if options["filename"].to_s != ""
  @guest_stars = options["GuestStars"][1..-1].split("|")
  @director = options["Director"]
  @writer = options["Writer"]
end

Instance Attribute Details

#air_dateObject

Returns the value of attribute air_date.



3
4
5
# File 'lib/tvdb_party/episode.rb', line 3

def air_date
  @air_date
end

#directorObject

Returns the value of attribute director.



3
4
5
# File 'lib/tvdb_party/episode.rb', line 3

def director
  @director
end

#guest_starsObject

Returns the value of attribute guest_stars.



3
4
5
# File 'lib/tvdb_party/episode.rb', line 3

def guest_stars
  @guest_stars
end

#idObject

Returns the value of attribute id.



3
4
5
# File 'lib/tvdb_party/episode.rb', line 3

def id
  @id
end

#nameObject

Returns the value of attribute name.



3
4
5
# File 'lib/tvdb_party/episode.rb', line 3

def name
  @name
end

#numberObject

Returns the value of attribute number.



3
4
5
# File 'lib/tvdb_party/episode.rb', line 3

def number
  @number
end

#overviewObject

Returns the value of attribute overview.



3
4
5
# File 'lib/tvdb_party/episode.rb', line 3

def overview
  @overview
end

#season_numberObject

Returns the value of attribute season_number.



3
4
5
# File 'lib/tvdb_party/episode.rb', line 3

def season_number
  @season_number
end

#thumbObject

Returns the value of attribute thumb.



3
4
5
# File 'lib/tvdb_party/episode.rb', line 3

def thumb
  @thumb
end

#writerObject

Returns the value of attribute writer.



3
4
5
# File 'lib/tvdb_party/episode.rb', line 3

def writer
  @writer
end