Class: PokeApi::Ability::AbilityFlavorText

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

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_textObject (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

#languageObject (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_groupObject (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