Class: FreshTomatoes::Movie
- Inherits:
-
Object
- Object
- FreshTomatoes::Movie
- Defined in:
- lib/fresh_tomatoes/movie.rb
Constant Summary collapse
- @@all =
[]
Instance Attribute Summary collapse
-
#audience_score ⇒ Object
Returns the value of attribute audience_score.
-
#description ⇒ Object
Returns the value of attribute description.
-
#rating ⇒ Object
Returns the value of attribute rating.
-
#runtime ⇒ Object
Returns the value of attribute runtime.
-
#title ⇒ Object
readonly
Returns the value of attribute title.
-
#tomatometer ⇒ Object
readonly
Returns the value of attribute tomatometer.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(title, url, tomatometer) ⇒ Movie
constructor
A new instance of Movie.
Constructor Details
#initialize(title, url, tomatometer) ⇒ Movie
Returns a new instance of Movie.
6 7 8 9 10 11 |
# File 'lib/fresh_tomatoes/movie.rb', line 6 def initialize(title, url, tomatometer) @title = title @url = url @tomatometer = tomatometer @@all << self end |
Instance Attribute Details
#audience_score ⇒ Object
Returns the value of attribute audience_score.
4 5 6 |
# File 'lib/fresh_tomatoes/movie.rb', line 4 def audience_score @audience_score end |
#description ⇒ Object
Returns the value of attribute description.
4 5 6 |
# File 'lib/fresh_tomatoes/movie.rb', line 4 def description @description end |
#rating ⇒ Object
Returns the value of attribute rating.
4 5 6 |
# File 'lib/fresh_tomatoes/movie.rb', line 4 def @rating end |
#runtime ⇒ Object
Returns the value of attribute runtime.
4 5 6 |
# File 'lib/fresh_tomatoes/movie.rb', line 4 def runtime @runtime end |
#title ⇒ Object (readonly)
Returns the value of attribute title.
3 4 5 |
# File 'lib/fresh_tomatoes/movie.rb', line 3 def title @title end |
#tomatometer ⇒ Object (readonly)
Returns the value of attribute tomatometer.
3 4 5 |
# File 'lib/fresh_tomatoes/movie.rb', line 3 def tomatometer @tomatometer end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
3 4 5 |
# File 'lib/fresh_tomatoes/movie.rb', line 3 def url @url end |
Class Method Details
.all ⇒ Object
13 14 15 |
# File 'lib/fresh_tomatoes/movie.rb', line 13 def self.all @@all end |