Class: WhatToWatch::Show
- Inherits:
-
Object
- Object
- WhatToWatch::Show
- Defined in:
- lib/what_to_watch/show.rb
Constant Summary collapse
- @@all =
WhatToWatch::BestMovies.add_shows WhatToWatch::BestMovies.list() “y”, amazon_prime: “y”, hbo_now: “y”, hulu: “y”, showtime: “y”
[]
- @@filtered =
[]
Instance Attribute Summary collapse
-
#cast ⇒ Object
Returns the value of attribute cast.
-
#category ⇒ Object
Returns the value of attribute category.
-
#description ⇒ Object
Returns the value of attribute description.
-
#genre_year ⇒ Object
Returns the value of attribute genre_year.
-
#streaming_service ⇒ Object
Returns the value of attribute streaming_service.
-
#title ⇒ Object
Returns the value of attribute title.
-
#url ⇒ Object
Returns the value of attribute url.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(title = "", streaming_service = "", category = "") ⇒ Show
constructor
A new instance of Show.
Constructor Details
#initialize(title = "", streaming_service = "", category = "") ⇒ Show
Returns a new instance of Show.
12 13 14 15 16 17 |
# File 'lib/what_to_watch/show.rb', line 12 def initialize(title="", streaming_service="", category= "") @title = title @streaming_service = streaming_service @category = category @@all << self end |
Instance Attribute Details
#cast ⇒ Object
Returns the value of attribute cast.
2 3 4 |
# File 'lib/what_to_watch/show.rb', line 2 def cast @cast end |
#category ⇒ Object
Returns the value of attribute category.
2 3 4 |
# File 'lib/what_to_watch/show.rb', line 2 def category @category end |
#description ⇒ Object
Returns the value of attribute description.
2 3 4 |
# File 'lib/what_to_watch/show.rb', line 2 def description @description end |
#genre_year ⇒ Object
Returns the value of attribute genre_year.
2 3 4 |
# File 'lib/what_to_watch/show.rb', line 2 def genre_year @genre_year end |
#streaming_service ⇒ Object
Returns the value of attribute streaming_service.
2 3 4 |
# File 'lib/what_to_watch/show.rb', line 2 def streaming_service @streaming_service end |
#title ⇒ Object
Returns the value of attribute title.
2 3 4 |
# File 'lib/what_to_watch/show.rb', line 2 def title @title end |
#url ⇒ Object
Returns the value of attribute url.
2 3 4 |
# File 'lib/what_to_watch/show.rb', line 2 def url @url end |
Class Method Details
.filter(selection) ⇒ Object
19 20 21 |
# File 'lib/what_to_watch/show.rb', line 19 def self.filter(selection) @@filtered = @@all.select{|object| object.category.include?("#{selection}")} end |
.filtered ⇒ Object
23 24 25 |
# File 'lib/what_to_watch/show.rb', line 23 def self.filtered @@filtered end |