Class: PokeApi::BerryFlavor::FlavorBerryMap

Inherits:
Object
  • Object
show all
Defined in:
lib/poke_api/berry_flavor/flavor_berry_map.rb

Overview

FlavorBerryMap object handling all data fetched from /berry-flavor berries

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ FlavorBerryMap

Returns a new instance of FlavorBerryMap.



8
9
10
11
# File 'lib/poke_api/berry_flavor/flavor_berry_map.rb', line 8

def initialize(data)
  @berry = Berry.new(data[:berry])
  @potency = data[:potency]
end

Instance Attribute Details

#berryObject (readonly)

Returns the value of attribute berry.



5
6
7
# File 'lib/poke_api/berry_flavor/flavor_berry_map.rb', line 5

def berry
  @berry
end

#potencyObject (readonly)

Returns the value of attribute potency.



5
6
7
# File 'lib/poke_api/berry_flavor/flavor_berry_map.rb', line 5

def potency
  @potency
end