Class: Lotr::Sdk::Movie
- Inherits:
-
Object
- Object
- Lotr::Sdk::Movie
- Defined in:
- lib/lotr/sdk/movie.rb
Overview
Movie represents the data of a movie.
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
Returns the value of attribute data.
-
#quotes ⇒ Object
readonly
Returns the value of attribute quotes.
Instance Method Summary collapse
-
#academy_award_nominations ⇒ Integer
Represents the number of Academy Award nominations.
-
#academy_award_wins ⇒ Integer
Represents the number of Academy Awards won.
-
#budget_millions ⇒ Integer
Represents the movie budget in milions.
-
#id ⇒ String
Represents the movie ID.
-
#initialize(data) ⇒ Movie
constructor
A new instance of Movie.
-
#name ⇒ String
Represents the movie title.
-
#revenue_millions ⇒ Integer
Represents the movie revenue in milions.
-
#rotten_tomatoes_score ⇒ Integer
Represents the score out of 100 on Rotten Tomatoes.
-
#run_time_minutes(format: false) ⇒ Integer
Represents the movie length.
Constructor Details
#initialize(data) ⇒ Movie
Returns a new instance of Movie.
9 10 11 12 |
# File 'lib/lotr/sdk/movie.rb', line 9 def initialize(data) @data = data @quotes = [] end |
Instance Attribute Details
#data ⇒ Object (readonly)
Returns the value of attribute data.
7 8 9 |
# File 'lib/lotr/sdk/movie.rb', line 7 def data @data end |
#quotes ⇒ Object (readonly)
Returns the value of attribute quotes.
7 8 9 |
# File 'lib/lotr/sdk/movie.rb', line 7 def quotes @quotes end |
Instance Method Details
#academy_award_nominations ⇒ Integer
Represents the number of Academy Award nominations
46 47 48 |
# File 'lib/lotr/sdk/movie.rb', line 46 def academy_award_nominations @data["academyAwardNominations"] end |
#academy_award_wins ⇒ Integer
Represents the number of Academy Awards won
52 53 54 |
# File 'lib/lotr/sdk/movie.rb', line 52 def academy_award_wins @data["academyAwardWins"] end |
#budget_millions ⇒ Integer
Represents the movie budget in milions
34 35 36 |
# File 'lib/lotr/sdk/movie.rb', line 34 def budget_millions @data["budgetInMillions"] end |
#id ⇒ String
Represents the movie ID
16 17 18 |
# File 'lib/lotr/sdk/movie.rb', line 16 def id @data["_id"] end |
#name ⇒ String
Represents the movie title
22 23 24 |
# File 'lib/lotr/sdk/movie.rb', line 22 def name @data["name"] end |
#revenue_millions ⇒ Integer
Represents the movie revenue in milions
40 41 42 |
# File 'lib/lotr/sdk/movie.rb', line 40 def revenue_millions @data["boxOfficeRevenueInMillions"] end |
#rotten_tomatoes_score ⇒ Integer
Represents the score out of 100 on Rotten Tomatoes
58 59 60 |
# File 'lib/lotr/sdk/movie.rb', line 58 def rotten_tomatoes_score @data["rottenTomatoesScore"] end |
#run_time_minutes(format: false) ⇒ Integer
Represents the movie length
28 29 30 |
# File 'lib/lotr/sdk/movie.rb', line 28 def run_time_minutes(format: false) @data["runtimeInMinutes"] end |