Class: PokeApi::Berry::BerryFlavorMap

Inherits:
Object
  • Object
show all
Defined in:
lib/poke_api/berry/berry_flavor_map.rb

Overview

BerryFlavorMap object handling lists of flavors

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ BerryFlavorMap

Returns a new instance of BerryFlavorMap.



8
9
10
11
# File 'lib/poke_api/berry/berry_flavor_map.rb', line 8

def initialize(data)
  @flavor  = PokeApi::BerryFlavor.new(data[:flavor])
  @potency = data[:potency]
end

Instance Attribute Details

#flavorObject (readonly)

Returns the value of attribute flavor.



5
6
7
# File 'lib/poke_api/berry/berry_flavor_map.rb', line 5

def flavor
  @flavor
end

#potencyObject (readonly)

Returns the value of attribute potency.



5
6
7
# File 'lib/poke_api/berry/berry_flavor_map.rb', line 5

def potency
  @potency
end