Class: Lotr::Sdk::Quote
- Inherits:
-
Object
- Object
- Lotr::Sdk::Quote
- Defined in:
- lib/lotr/sdk/quote.rb
Overview
Quote represents the data of a quote.
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
Returns the value of attribute data.
Instance Method Summary collapse
-
#character ⇒ String
Represents the character that spoke the quote Characters are not supported in this version of the SDK.
-
#dialog ⇒ String
Represents the quote text.
-
#id ⇒ String
Represents the quote ID.
-
#initialize(data) ⇒ Quote
constructor
A new instance of Quote.
-
#movie ⇒ String
Fetch the ID of the movie the quote comes from.
Constructor Details
#initialize(data) ⇒ Quote
Returns a new instance of Quote.
9 10 11 |
# File 'lib/lotr/sdk/quote.rb', line 9 def initialize(data) @data = data end |
Instance Attribute Details
#data ⇒ Object (readonly)
Returns the value of attribute data.
7 8 9 |
# File 'lib/lotr/sdk/quote.rb', line 7 def data @data end |
Instance Method Details
#character ⇒ String
Represents the character that spoke the quote Characters are not supported in this version of the SDK
34 35 36 |
# File 'lib/lotr/sdk/quote.rb', line 34 def character @data["character"] end |
#dialog ⇒ String
Represents the quote text
21 22 23 |
# File 'lib/lotr/sdk/quote.rb', line 21 def dialog @data["dialog"] end |
#id ⇒ String
Represents the quote ID
15 16 17 |
# File 'lib/lotr/sdk/quote.rb', line 15 def id @data["_id"] end |
#movie ⇒ String
Fetch the ID of the movie the quote comes from
27 28 29 |
# File 'lib/lotr/sdk/quote.rb', line 27 def movie @data["movie"] end |