Class: Believe::Models::Quote
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Believe::Models::Quote
- Defined in:
- lib/believe/models/quote.rb
Overview
Instance Attribute Summary collapse
-
#character_id ⇒ String
ID of the character who said it.
-
#context ⇒ String
Context in which the quote was said.
-
#episode_id ⇒ String?
Episode where the quote appears.
-
#id ⇒ String
Unique identifier.
-
#is_funny ⇒ Boolean?
Whether this quote is humorous.
-
#is_inspirational ⇒ Boolean?
Whether this quote is inspirational.
-
#moment_type ⇒ Symbol, ::Believe::Models::QuoteMoment
Type of moment when the quote was said.
-
#popularity_score ⇒ Float?
Popularity/virality score (0-100).
-
#secondary_themes ⇒ Array<Symbol, ::Believe::Models::QuoteTheme>?
Additional themes.
-
#text ⇒ String
The quote text.
-
#theme ⇒ Symbol, ::Believe::Models::QuoteTheme
Primary theme of the quote.
-
#times_shared ⇒ Integer?
Number of times shared on social media.
Instance Method Summary collapse
-
#initialize(id:, character_id:, context:, moment_type:, text:, theme:, episode_id: nil, is_funny: nil, is_inspirational: nil, popularity_score: nil, secondary_themes: nil, times_shared: nil) ⇒ Object
constructor
Full quote model with ID.
Methods inherited from Internal::Type::BaseModel
==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml
Methods included from Internal::Type::Converter
#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info
Methods included from Internal::Util::SorbetRuntimeSupport
#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type
Constructor Details
#initialize(id:, character_id:, context:, moment_type:, text:, theme:, episode_id: nil, is_funny: nil, is_inspirational: nil, popularity_score: nil, secondary_themes: nil, times_shared: nil) ⇒ Object
Full quote model with ID.
|
|
# File 'lib/believe/models/quote.rb', line 79
|
Instance Attribute Details
#character_id ⇒ String
ID of the character who said it
17 |
# File 'lib/believe/models/quote.rb', line 17 required :character_id, String |
#context ⇒ String
Context in which the quote was said
23 |
# File 'lib/believe/models/quote.rb', line 23 required :context, String |
#episode_id ⇒ String?
Episode where the quote appears
47 |
# File 'lib/believe/models/quote.rb', line 47 optional :episode_id, String, nil?: true |
#id ⇒ String
Unique identifier
11 |
# File 'lib/believe/models/quote.rb', line 11 required :id, String |
#is_funny ⇒ Boolean?
Whether this quote is humorous
53 |
# File 'lib/believe/models/quote.rb', line 53 optional :is_funny, ::Believe::Internal::Type::Boolean |
#is_inspirational ⇒ Boolean?
Whether this quote is inspirational
59 |
# File 'lib/believe/models/quote.rb', line 59 optional :is_inspirational, ::Believe::Internal::Type::Boolean |
#moment_type ⇒ Symbol, ::Believe::Models::QuoteMoment
Type of moment when the quote was said
29 |
# File 'lib/believe/models/quote.rb', line 29 required :moment_type, enum: -> { ::Believe::QuoteMoment } |
#popularity_score ⇒ Float?
Popularity/virality score (0-100)
65 |
# File 'lib/believe/models/quote.rb', line 65 optional :popularity_score, Float, nil?: true |
#secondary_themes ⇒ Array<Symbol, ::Believe::Models::QuoteTheme>?
Additional themes
71 |
# File 'lib/believe/models/quote.rb', line 71 optional :secondary_themes, -> { ::Believe::Internal::Type::ArrayOf[enum: ::Believe::QuoteTheme] } |
#text ⇒ String
The quote text
35 |
# File 'lib/believe/models/quote.rb', line 35 required :text, String |
#theme ⇒ Symbol, ::Believe::Models::QuoteTheme
Primary theme of the quote
41 |
# File 'lib/believe/models/quote.rb', line 41 required :theme, enum: -> { ::Believe::QuoteTheme } |
#times_shared ⇒ Integer?
Number of times shared on social media
77 |
# File 'lib/believe/models/quote.rb', line 77 optional :times_shared, Integer, nil?: true |