Class: PokeApi::PokemonForm

Inherits:
NamedApiResource show all
Defined in:
lib/poke_api/pokemon_form.rb,
lib/poke_api/pokemon_form/pokemon_form_sprites.rb

Overview

PokemonForm object handling all data fetched from /pokemon-form

Defined Under Namespace

Classes: PokemonFormSprites

Instance Attribute Summary collapse

Attributes inherited from NamedApiResource

#id, #name, #url

Instance Method Summary collapse

Methods inherited from NamedApiResource

#get

Methods included from AssignmentHelpers

assign_list, custom_endpoint_object, endpoint_assignment, get_named_api_resource_from_url, try_to_assign

Constructor Details

#initialize(data) ⇒ PokemonForm

Returns a new instance of PokemonForm.



16
17
18
# File 'lib/poke_api/pokemon_form.rb', line 16

def initialize(data)
  assign_data(data)
end

Instance Attribute Details

#form_nameObject (readonly)

Returns the value of attribute form_name.



4
5
6
# File 'lib/poke_api/pokemon_form.rb', line 4

def form_name
  @form_name
end

#form_namesObject (readonly)

Returns the value of attribute form_names.



4
5
6
# File 'lib/poke_api/pokemon_form.rb', line 4

def form_names
  @form_names
end

#form_orderObject (readonly)

Returns the value of attribute form_order.



4
5
6
# File 'lib/poke_api/pokemon_form.rb', line 4

def form_order
  @form_order
end

#is_battle_onlyObject (readonly)

Returns the value of attribute is_battle_only.



4
5
6
# File 'lib/poke_api/pokemon_form.rb', line 4

def is_battle_only
  @is_battle_only
end

#is_defaultObject (readonly)

Returns the value of attribute is_default.



4
5
6
# File 'lib/poke_api/pokemon_form.rb', line 4

def is_default
  @is_default
end

#is_megaObject (readonly)

Returns the value of attribute is_mega.



4
5
6
# File 'lib/poke_api/pokemon_form.rb', line 4

def is_mega
  @is_mega
end

#namesObject (readonly)

Returns the value of attribute names.



4
5
6
# File 'lib/poke_api/pokemon_form.rb', line 4

def names
  @names
end

#orderObject (readonly)

Returns the value of attribute order.



4
5
6
# File 'lib/poke_api/pokemon_form.rb', line 4

def order
  @order
end

#pokemonObject (readonly)

Returns the value of attribute pokemon.



4
5
6
# File 'lib/poke_api/pokemon_form.rb', line 4

def pokemon
  @pokemon
end

#spritesObject (readonly)

Returns the value of attribute sprites.



4
5
6
# File 'lib/poke_api/pokemon_form.rb', line 4

def sprites
  @sprites
end

#version_groupObject (readonly)

Returns the value of attribute version_group.



4
5
6
# File 'lib/poke_api/pokemon_form.rb', line 4

def version_group
  @version_group
end