Class: Newzcache::Series
- Inherits:
-
Object
- Object
- Newzcache::Series
- Defined in:
- lib/newzcache/series.rb
Instance Attribute Summary collapse
-
#banner_url ⇒ Object
Returns the value of attribute banner_url.
-
#client ⇒ Object
readonly
Returns the value of attribute client.
-
#description ⇒ Object
Returns the value of attribute description.
-
#first_aired ⇒ Object
Returns the value of attribute first_aired.
-
#genres ⇒ Object
Returns the value of attribute genres.
-
#id ⇒ Object
Returns the value of attribute id.
-
#network ⇒ Object
Returns the value of attribute network.
-
#poster_thumb_url ⇒ Object
Returns the value of attribute poster_thumb_url.
-
#poster_url ⇒ Object
Returns the value of attribute poster_url.
-
#rating ⇒ Object
Returns the value of attribute rating.
-
#recommended ⇒ Object
Returns the value of attribute recommended.
-
#runtime ⇒ Object
Returns the value of attribute runtime.
-
#seasons ⇒ Object
Returns the value of attribute seasons.
-
#title ⇒ Object
Returns the value of attribute title.
Instance Method Summary collapse
-
#initialize(client, options = {}) ⇒ Series
constructor
A new instance of Series.
- #season(season_number) ⇒ Object
Constructor Details
#initialize(client, options = {}) ⇒ Series
Returns a new instance of Series.
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/newzcache/series.rb', line 7 def initialize(client, ={}) @client = client @poster_url = ["poster_url"] @runtime = ["runtime"] @rating = ["rating"] @title = ["title"] @first_aired = ["first_aired"] @id = ["id"] @network = ["network"] @recommended = ["recommended"] @poster_thumb_url = ["poster_thumb_url"] @banner_url = ["banner_url"] @description = ["description"] @genres = ["genres"].map{|result| Genre.new(result["genre"])} end |
Instance Attribute Details
#banner_url ⇒ Object
Returns the value of attribute banner_url.
4 5 6 |
# File 'lib/newzcache/series.rb', line 4 def @banner_url end |
#client ⇒ Object (readonly)
Returns the value of attribute client.
3 4 5 |
# File 'lib/newzcache/series.rb', line 3 def client @client end |
#description ⇒ Object
Returns the value of attribute description.
4 5 6 |
# File 'lib/newzcache/series.rb', line 4 def description @description end |
#first_aired ⇒ Object
Returns the value of attribute first_aired.
4 5 6 |
# File 'lib/newzcache/series.rb', line 4 def first_aired @first_aired end |
#genres ⇒ Object
Returns the value of attribute genres.
4 5 6 |
# File 'lib/newzcache/series.rb', line 4 def genres @genres end |
#id ⇒ Object
Returns the value of attribute id.
4 5 6 |
# File 'lib/newzcache/series.rb', line 4 def id @id end |
#network ⇒ Object
Returns the value of attribute network.
4 5 6 |
# File 'lib/newzcache/series.rb', line 4 def network @network end |
#poster_thumb_url ⇒ Object
Returns the value of attribute poster_thumb_url.
4 5 6 |
# File 'lib/newzcache/series.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/series.rb', line 4 def poster_url @poster_url end |
#rating ⇒ Object
Returns the value of attribute rating.
4 5 6 |
# File 'lib/newzcache/series.rb', line 4 def @rating end |
#recommended ⇒ Object
Returns the value of attribute recommended.
4 5 6 |
# File 'lib/newzcache/series.rb', line 4 def recommended @recommended end |
#runtime ⇒ Object
Returns the value of attribute runtime.
4 5 6 |
# File 'lib/newzcache/series.rb', line 4 def runtime @runtime end |
#seasons ⇒ Object
Returns the value of attribute seasons.
4 5 6 |
# File 'lib/newzcache/series.rb', line 4 def seasons @seasons end |
#title ⇒ Object
Returns the value of attribute title.
4 5 6 |
# File 'lib/newzcache/series.rb', line 4 def title @title end |
Instance Method Details
#season(season_number) ⇒ Object
27 28 29 |
# File 'lib/newzcache/series.rb', line 27 def season(season_number) seasons.detect{|s| s.number == season_number} end |