Class: Allocine::Episode
- Inherits:
-
Object
- Object
- Allocine::Episode
- Defined in:
- lib/allocine/episode.rb
Instance Attribute Summary collapse
-
#number ⇒ Object
Represent an Episode on Allocine website s = Allocine::Episode.new(233014) e = s.title.
-
#release_date ⇒ Object
Represent an Episode on Allocine website s = Allocine::Episode.new(233014) e = s.title.
-
#synopsis ⇒ Object
Represent an Episode on Allocine website s = Allocine::Episode.new(233014) e = s.title.
-
#title ⇒ Object
Returns the title.
Instance Method Summary collapse
- #episode_number_season ⇒ Object
- #episode_number_series ⇒ Object
-
#initialize(allocine_id) ⇒ Episode
constructor
A new instance of Episode.
-
#original_broadcast_date ⇒ Object
Returns the broadcast date.
-
#original_title ⇒ Object
Returns the original title.
-
#plot(short = true) ⇒ Object
Returns the plot.
-
#season ⇒ Object
Returns the season parent.
-
#serie ⇒ Object
Returns the serie parent.
Constructor Details
#initialize(allocine_id) ⇒ Episode
Returns a new instance of Episode.
11 12 13 |
# File 'lib/allocine/episode.rb', line 11 def initialize(allocine_id) @id = allocine_id end |
Instance Attribute Details
#number ⇒ Object
Represent an Episode on Allocine website s = Allocine::Episode.new(233014) e = s.title
9 10 11 |
# File 'lib/allocine/episode.rb', line 9 def number @number end |
#release_date ⇒ Object
Represent an Episode on Allocine website s = Allocine::Episode.new(233014) e = s.title
9 10 11 |
# File 'lib/allocine/episode.rb', line 9 def release_date @release_date end |
#synopsis ⇒ Object
Represent an Episode on Allocine website s = Allocine::Episode.new(233014) e = s.title
9 10 11 |
# File 'lib/allocine/episode.rb', line 9 def synopsis @synopsis end |
#title ⇒ Object
Returns the title
9 10 11 |
# File 'lib/allocine/episode.rb', line 9 def title @title end |
Instance Method Details
#episode_number_season ⇒ Object
49 50 51 |
# File 'lib/allocine/episode.rb', line 49 def episode_number_season document["episodeNumberSeason"] end |
#episode_number_series ⇒ Object
45 46 47 |
# File 'lib/allocine/episode.rb', line 45 def episode_number_series document["episodeNumberSeries"] end |
#original_broadcast_date ⇒ Object
Returns the broadcast date
36 37 38 |
# File 'lib/allocine/episode.rb', line 36 def original_broadcast_date document["originalBroadcastDate"] rescue nil end |
#original_title ⇒ Object
Returns the original title
31 32 33 |
# File 'lib/allocine/episode.rb', line 31 def original_title document["originalTitle"] rescue nil end |
#plot(short = true) ⇒ Object
Returns the plot
41 42 43 |
# File 'lib/allocine/episode.rb', line 41 def plot(short = true) short == true ? document["synopsisShort"] : document["synopsis"] end |