Class: Newzcache::Season
- Inherits:
-
Object
- Object
- Newzcache::Season
- Defined in:
- lib/newzcache/season.rb
Instance Attribute Summary collapse
-
#client ⇒ Object
readonly
Returns the value of attribute client.
-
#episodes ⇒ Object
Returns the value of attribute episodes.
-
#id ⇒ Object
Returns the value of attribute id.
-
#number ⇒ Object
Returns the value of attribute number.
-
#poster_thumb_url ⇒ Object
Returns the value of attribute poster_thumb_url.
-
#poster_url ⇒ Object
Returns the value of attribute poster_url.
-
#series ⇒ Object
Returns the value of attribute series.
Instance Method Summary collapse
- #episode(episode_number) ⇒ Object
-
#initialize(client, series, options = {}) ⇒ Season
constructor
A new instance of Season.
Constructor Details
#initialize(client, series, options = {}) ⇒ Season
Returns a new instance of Season.
6 7 8 9 10 11 12 13 |
# File 'lib/newzcache/season.rb', line 6 def initialize(client, series, ={}) @client = client @series = series @poster_url = ["poster_url"] @poster_thumb_url = ["poster_thumb_url"] @number = ["number"] @id = ["id"] end |
Instance Attribute Details
#client ⇒ Object (readonly)
Returns the value of attribute client.
3 4 5 |
# File 'lib/newzcache/season.rb', line 3 def client @client end |
#episodes ⇒ Object
Returns the value of attribute episodes.
4 5 6 |
# File 'lib/newzcache/season.rb', line 4 def episodes @episodes end |
#id ⇒ Object
Returns the value of attribute id.
4 5 6 |
# File 'lib/newzcache/season.rb', line 4 def id @id end |
#number ⇒ Object
Returns the value of attribute number.
4 5 6 |
# File 'lib/newzcache/season.rb', line 4 def number @number end |
#poster_thumb_url ⇒ Object
Returns the value of attribute poster_thumb_url.
4 5 6 |
# File 'lib/newzcache/season.rb', line 4 def poster_thumb_url @poster_thumb_url end |
#poster_url ⇒ Object
Returns the value of attribute poster_url.
4 5 6 |
# File 'lib/newzcache/season.rb', line 4 def poster_url @poster_url end |
#series ⇒ Object
Returns the value of attribute series.
4 5 6 |
# File 'lib/newzcache/season.rb', line 4 def series @series end |
Instance Method Details
#episode(episode_number) ⇒ Object
19 20 21 |
# File 'lib/newzcache/season.rb', line 19 def episode(episode_number) episodes.detect{|e| e.number == episode_number} end |