Class: PokeApi::Common::FlavorText
- Inherits:
-
Object
- Object
- PokeApi::Common::FlavorText
- Includes:
- AssignmentHelpers
- Defined in:
- lib/poke_api/common/flavor_text.rb
Overview
FlavorText object handling lists of FlavorText
Instance Attribute Summary collapse
-
#flavor_text ⇒ Object
readonly
Returns the value of attribute flavor_text.
-
#language ⇒ Object
readonly
Returns the value of attribute language.
-
#version ⇒ Object
readonly
Returns the value of attribute version.
Instance Method Summary collapse
-
#initialize(data) ⇒ FlavorText
constructor
A new instance of FlavorText.
Methods included from AssignmentHelpers
assign_list, custom_endpoint_object, endpoint_assignment, get_named_api_resource_from_url, try_to_assign
Constructor Details
#initialize(data) ⇒ FlavorText
Returns a new instance of FlavorText.
11 12 13 14 15 |
# File 'lib/poke_api/common/flavor_text.rb', line 11 def initialize(data) @flavor_text = data[:flavor_text] @language = Utility::Language.new(data[:language]) @version = try_to_assign(data: data[:version], klass: Version) end |
Instance Attribute Details
#flavor_text ⇒ Object (readonly)
Returns the value of attribute flavor_text.
7 8 9 |
# File 'lib/poke_api/common/flavor_text.rb', line 7 def flavor_text @flavor_text end |
#language ⇒ Object (readonly)
Returns the value of attribute language.
7 8 9 |
# File 'lib/poke_api/common/flavor_text.rb', line 7 def language @language end |
#version ⇒ Object (readonly)
Returns the value of attribute version.
7 8 9 |
# File 'lib/poke_api/common/flavor_text.rb', line 7 def version @version end |