Class: PokeApi::Item

Inherits:
NamedApiResource show all
Defined in:
lib/poke_api/item.rb,
lib/poke_api/item/item_sprites.rb,
lib/poke_api/item/item_holder_pokemon.rb,
lib/poke_api/item/item_holder_pokemon_version_detail.rb

Overview

Item object handling all data fetched from /item

Defined Under Namespace

Classes: ItemHolderPokemon, ItemHolderPokemonVersionDetail, ItemSprites

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) ⇒ Item

Returns a new instance of Item.



18
19
20
# File 'lib/poke_api/item.rb', line 18

def initialize(data)
  assign_data(data)
end

Instance Attribute Details

#attributesObject (readonly)

Returns the value of attribute attributes.



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

def attributes
  @attributes
end

#baby_trigger_forObject (readonly)

Returns the value of attribute baby_trigger_for.



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

def baby_trigger_for
  @baby_trigger_for
end

#categoryObject (readonly)

Returns the value of attribute category.



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

def category
  @category
end

#costObject (readonly)

Returns the value of attribute cost.



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

def cost
  @cost
end

#effect_entriesObject (readonly)

Returns the value of attribute effect_entries.



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

def effect_entries
  @effect_entries
end

#flavor_text_entriesObject (readonly)

Returns the value of attribute flavor_text_entries.



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

def flavor_text_entries
  @flavor_text_entries
end

#fling_effectObject (readonly)

Returns the value of attribute fling_effect.



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

def fling_effect
  @fling_effect
end

#fling_powerObject (readonly)

Returns the value of attribute fling_power.



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

def fling_power
  @fling_power
end

#game_indicesObject (readonly)

Returns the value of attribute game_indices.



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

def game_indices
  @game_indices
end

#held_by_pokemonObject (readonly)

Returns the value of attribute held_by_pokemon.



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

def held_by_pokemon
  @held_by_pokemon
end

#machinesObject (readonly)

Returns the value of attribute machines.



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

def machines
  @machines
end

#namesObject (readonly)

Returns the value of attribute names.



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

def names
  @names
end

#spritesObject (readonly)

Returns the value of attribute sprites.



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

def sprites
  @sprites
end