Class: PokeApi::Pokemon::PokemonSprites
- Inherits:
-
Object
- Object
- PokeApi::Pokemon::PokemonSprites
- Defined in:
- lib/poke_api/pokemon/pokemon_sprites.rb
Overview
PokemonSprites object handling all data fetched from /pokemon sprites
Instance Attribute Summary collapse
-
#back_default ⇒ Object
readonly
Returns the value of attribute back_default.
-
#back_female ⇒ Object
readonly
Returns the value of attribute back_female.
-
#back_shiny ⇒ Object
readonly
Returns the value of attribute back_shiny.
-
#back_shiny_female ⇒ Object
readonly
Returns the value of attribute back_shiny_female.
-
#front_default ⇒ Object
readonly
Returns the value of attribute front_default.
-
#front_female ⇒ Object
readonly
Returns the value of attribute front_female.
-
#front_shiny ⇒ Object
readonly
Returns the value of attribute front_shiny.
-
#front_shiny_female ⇒ Object
readonly
Returns the value of attribute front_shiny_female.
Instance Method Summary collapse
-
#initialize(data) ⇒ PokemonSprites
constructor
A new instance of PokemonSprites.
Constructor Details
#initialize(data) ⇒ PokemonSprites
Returns a new instance of PokemonSprites.
14 15 16 17 18 19 20 21 22 23 |
# File 'lib/poke_api/pokemon/pokemon_sprites.rb', line 14 def initialize(data) @back_female = data[:back_female] @back_shiny_female = data[:back_shiny_female] @back_default = data[:back_default] @front_female = data[:front_female] @front_shiny_female = data[:front_shiny_female] @back_shiny = data[:back_shiny] @front_default = data[:front_default] @front_shiny = data[:front_shiny] end |
Instance Attribute Details
#back_default ⇒ Object (readonly)
Returns the value of attribute back_default.
5 6 7 |
# File 'lib/poke_api/pokemon/pokemon_sprites.rb', line 5 def back_default @back_default end |
#back_female ⇒ Object (readonly)
Returns the value of attribute back_female.
5 6 7 |
# File 'lib/poke_api/pokemon/pokemon_sprites.rb', line 5 def back_female @back_female end |
#back_shiny ⇒ Object (readonly)
Returns the value of attribute back_shiny.
5 6 7 |
# File 'lib/poke_api/pokemon/pokemon_sprites.rb', line 5 def back_shiny @back_shiny end |
#back_shiny_female ⇒ Object (readonly)
Returns the value of attribute back_shiny_female.
5 6 7 |
# File 'lib/poke_api/pokemon/pokemon_sprites.rb', line 5 def back_shiny_female @back_shiny_female end |
#front_default ⇒ Object (readonly)
Returns the value of attribute front_default.
5 6 7 |
# File 'lib/poke_api/pokemon/pokemon_sprites.rb', line 5 def front_default @front_default end |
#front_female ⇒ Object (readonly)
Returns the value of attribute front_female.
5 6 7 |
# File 'lib/poke_api/pokemon/pokemon_sprites.rb', line 5 def front_female @front_female end |
#front_shiny ⇒ Object (readonly)
Returns the value of attribute front_shiny.
5 6 7 |
# File 'lib/poke_api/pokemon/pokemon_sprites.rb', line 5 def front_shiny @front_shiny end |
#front_shiny_female ⇒ Object (readonly)
Returns the value of attribute front_shiny_female.
5 6 7 |
# File 'lib/poke_api/pokemon/pokemon_sprites.rb', line 5 def front_shiny_female @front_shiny_female end |