Class: Lotr::Sdk::Quote

Inherits:
Object
  • Object
show all
Defined in:
lib/lotr/sdk/quote.rb

Overview

Quote represents the data of a quote.

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#dataObject (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

#characterString

Represents the character that spoke the quote Characters are not supported in this version of the SDK

Returns:

  • (String)


34
35
36
# File 'lib/lotr/sdk/quote.rb', line 34

def character
  @data["character"]
end

#dialogString

Represents the quote text

Returns:

  • (String)


21
22
23
# File 'lib/lotr/sdk/quote.rb', line 21

def dialog
  @data["dialog"]
end

#idString

Represents the quote ID

Returns:

  • (String)


15
16
17
# File 'lib/lotr/sdk/quote.rb', line 15

def id
  @data["_id"]
end

#movieString

Fetch the ID of the movie the quote comes from

Returns:

  • (String)


27
28
29
# File 'lib/lotr/sdk/quote.rb', line 27

def movie
  @data["movie"]
end