Class: Believe::Models::Character

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/believe/models/character.rb

Overview

Instance Attribute Summary collapse

Instance Method Summary collapse

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:, background:, emotional_stats:, name:, personality_traits:, role:, date_of_birth: nil, email: nil, growth_arcs: nil, height_meters: nil, profile_image_url: nil, salary_gbp: nil, signature_quotes: nil, team_id: nil) ⇒ Object

Full character model with ID.

Parameters:

  • id (String)

    Unique identifier

  • background (String)

    Character background and history

  • emotional_stats (::Believe::Models::EmotionalStats)

    Emotional intelligence stats

  • name (String)

    Character’s full name

  • personality_traits (Array<String>)

    Key personality traits

  • role (Symbol, ::Believe::Models::CharacterRole)

    Character’s role

  • date_of_birth (Date, nil) (defaults to: nil)

    Character’s date of birth

  • email (String, nil) (defaults to: nil)

    Character’s email address

  • growth_arcs (Array<::Believe::Models::GrowthArc>) (defaults to: nil)

    Character development across seasons

  • height_meters (Float, nil) (defaults to: nil)

    Height in meters

  • profile_image_url (String, nil) (defaults to: nil)

    URL to character’s profile image

  • salary_gbp (String, nil) (defaults to: nil)

    Annual salary in GBP

  • signature_quotes (Array<String>) (defaults to: nil)

    Memorable quotes from this character

  • team_id (String, nil) (defaults to: nil)

    ID of the team they belong to



# File 'lib/believe/models/character.rb', line 91

Instance Attribute Details

#backgroundString

Character background and history

Returns:

  • (String)


17
# File 'lib/believe/models/character.rb', line 17

required :background, String

#date_of_birthDate?

Character’s date of birth

Returns:

  • (Date, nil)


47
# File 'lib/believe/models/character.rb', line 47

optional :date_of_birth, Date, nil?: true

#emailString?

Character’s email address

Returns:

  • (String, nil)


53
# File 'lib/believe/models/character.rb', line 53

optional :email, String, nil?: true

#emotional_stats::Believe::Models::EmotionalStats

Emotional intelligence stats



23
# File 'lib/believe/models/character.rb', line 23

required :emotional_stats, -> { ::Believe::EmotionalStats }

#growth_arcsArray<::Believe::Models::GrowthArc>?

Character development across seasons

Returns:



59
# File 'lib/believe/models/character.rb', line 59

optional :growth_arcs, -> { ::Believe::Internal::Type::ArrayOf[::Believe::GrowthArc] }

#height_metersFloat?

Height in meters

Returns:

  • (Float, nil)


65
# File 'lib/believe/models/character.rb', line 65

optional :height_meters, Float, nil?: true

#idString

Unique identifier

Returns:

  • (String)


11
# File 'lib/believe/models/character.rb', line 11

required :id, String

#nameString

Character’s full name

Returns:

  • (String)


29
# File 'lib/believe/models/character.rb', line 29

required :name, String

#personality_traitsArray<String>

Key personality traits

Returns:

  • (Array<String>)


35
# File 'lib/believe/models/character.rb', line 35

required :personality_traits, ::Believe::Internal::Type::ArrayOf[String]

#profile_image_urlString?

URL to character’s profile image

Returns:

  • (String, nil)


71
# File 'lib/believe/models/character.rb', line 71

optional :profile_image_url, String, nil?: true

#roleSymbol, ::Believe::Models::CharacterRole

Character’s role



41
# File 'lib/believe/models/character.rb', line 41

required :role, enum: -> { ::Believe::CharacterRole }

#salary_gbpString?

Annual salary in GBP

Returns:

  • (String, nil)


77
# File 'lib/believe/models/character.rb', line 77

optional :salary_gbp, String, nil?: true

#signature_quotesArray<String>?

Memorable quotes from this character

Returns:

  • (Array<String>, nil)


83
# File 'lib/believe/models/character.rb', line 83

optional :signature_quotes, ::Believe::Internal::Type::ArrayOf[String]

#team_idString?

ID of the team they belong to

Returns:

  • (String, nil)


89
# File 'lib/believe/models/character.rb', line 89

optional :team_id, String, nil?: true