Class: TvdbParty::Episode
- Inherits:
-
Object
- Object
- TvdbParty::Episode
- Defined in:
- lib/tvdb_party/episode.rb
Instance Attribute Summary collapse
-
#air_date ⇒ Object
Returns the value of attribute air_date.
-
#client ⇒ Object
readonly
Returns the value of attribute client.
-
#director ⇒ Object
Returns the value of attribute director.
-
#guest_stars ⇒ Object
Returns the value of attribute guest_stars.
-
#id ⇒ Object
Returns the value of attribute id.
-
#name ⇒ Object
Returns the value of attribute name.
-
#number ⇒ Object
Returns the value of attribute number.
-
#overview ⇒ Object
Returns the value of attribute overview.
-
#season_number ⇒ Object
Returns the value of attribute season_number.
-
#thumb ⇒ Object
Returns the value of attribute thumb.
-
#writer ⇒ Object
Returns the value of attribute writer.
Instance Method Summary collapse
-
#initialize(client, options = {}) ⇒ Episode
constructor
A new instance of Episode.
- #series ⇒ Object
Constructor Details
#initialize(client, options = {}) ⇒ Episode
Returns a new instance of Episode.
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/tvdb_party/episode.rb', line 6 def initialize(client, ={}) @client = client @id = ["id"] @season_number = ["SeasonNumber"] @number = ["EpisodeNumber"] @name = ["EpisodeName"] @overview = ["Overview"] @thumb = "http://thetvdb.com/banners/" + ["filename"] if ["filename"].to_s != "" @director = ["Director"] @writer = ["Writer"] @series_id = ["seriesid"] if ["GuestStars"] @guest_stars = ["GuestStars"][1..-1].split("|") else @guest_stars = [] end begin @air_date = Date.parse(["FirstAired"]) rescue puts 'invalid date' end end |
Instance Attribute Details
#air_date ⇒ Object
Returns the value of attribute air_date.
4 5 6 |
# File 'lib/tvdb_party/episode.rb', line 4 def air_date @air_date end |
#client ⇒ Object (readonly)
Returns the value of attribute client.
3 4 5 |
# File 'lib/tvdb_party/episode.rb', line 3 def client @client end |
#director ⇒ Object
Returns the value of attribute director.
4 5 6 |
# File 'lib/tvdb_party/episode.rb', line 4 def director @director end |
#guest_stars ⇒ Object
Returns the value of attribute guest_stars.
4 5 6 |
# File 'lib/tvdb_party/episode.rb', line 4 def guest_stars @guest_stars end |
#id ⇒ Object
Returns the value of attribute id.
4 5 6 |
# File 'lib/tvdb_party/episode.rb', line 4 def id @id end |
#name ⇒ Object
Returns the value of attribute name.
4 5 6 |
# File 'lib/tvdb_party/episode.rb', line 4 def name @name end |
#number ⇒ Object
Returns the value of attribute number.
4 5 6 |
# File 'lib/tvdb_party/episode.rb', line 4 def number @number end |
#overview ⇒ Object
Returns the value of attribute overview.
4 5 6 |
# File 'lib/tvdb_party/episode.rb', line 4 def overview @overview end |
#season_number ⇒ Object
Returns the value of attribute season_number.
4 5 6 |
# File 'lib/tvdb_party/episode.rb', line 4 def season_number @season_number end |
#thumb ⇒ Object
Returns the value of attribute thumb.
4 5 6 |
# File 'lib/tvdb_party/episode.rb', line 4 def thumb @thumb end |
#writer ⇒ Object
Returns the value of attribute writer.
4 5 6 |
# File 'lib/tvdb_party/episode.rb', line 4 def writer @writer end |
Instance Method Details
#series ⇒ Object
30 31 32 |
# File 'lib/tvdb_party/episode.rb', line 30 def series client.get_series_by_id(@series_id) end |