Class: PokeApi::Ability::AbilityFlavorText
- Inherits:
-
Object
- Object
- PokeApi::Ability::AbilityFlavorText
- Defined in:
- lib/poke_api/ability/ability_flavor_text.rb
Overview
AbilityFlavorText object handling all data fetched from /ability flavor_text_entries
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_group ⇒ Object
readonly
Returns the value of attribute version_group.
Instance Method Summary collapse
-
#initialize(data) ⇒ AbilityFlavorText
constructor
A new instance of AbilityFlavorText.
Constructor Details
#initialize(data) ⇒ AbilityFlavorText
Returns a new instance of AbilityFlavorText.
9 10 11 12 13 |
# File 'lib/poke_api/ability/ability_flavor_text.rb', line 9 def initialize(data) @flavor_text = data[:flavor_text] @language = Utility::Language.new(data[:language]) @version_group = VersionGroup.new(data[:version_group]) end |
Instance Attribute Details
#flavor_text ⇒ Object (readonly)
Returns the value of attribute flavor_text.
5 6 7 |
# File 'lib/poke_api/ability/ability_flavor_text.rb', line 5 def flavor_text @flavor_text end |
#language ⇒ Object (readonly)
Returns the value of attribute language.
5 6 7 |
# File 'lib/poke_api/ability/ability_flavor_text.rb', line 5 def language @language end |
#version_group ⇒ Object (readonly)
Returns the value of attribute version_group.
5 6 7 |
# File 'lib/poke_api/ability/ability_flavor_text.rb', line 5 def version_group @version_group end |