Class: PokeApi::BerryFlavor::FlavorBerryMap
- Inherits:
-
Object
- Object
- PokeApi::BerryFlavor::FlavorBerryMap
- 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
-
#berry ⇒ Object
readonly
Returns the value of attribute berry.
-
#potency ⇒ Object
readonly
Returns the value of attribute potency.
Instance Method Summary collapse
-
#initialize(data) ⇒ FlavorBerryMap
constructor
A new instance of FlavorBerryMap.
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
#berry ⇒ Object (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 |
#potency ⇒ Object (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 |