Class: PokeApi::Berry
- Inherits:
-
NamedApiResource
- Object
- NamedApiResource
- PokeApi::Berry
- Defined in:
- lib/poke_api/berry.rb,
lib/poke_api/berry/berry_flavor_map.rb
Overview
Berry object handling all data fetched from /berry
Defined Under Namespace
Classes: BerryFlavorMap
Instance Attribute Summary collapse
-
#firmness ⇒ Object
readonly
Returns the value of attribute firmness.
-
#flavors ⇒ Object
readonly
Returns the value of attribute flavors.
-
#growth_time ⇒ Object
readonly
Returns the value of attribute growth_time.
-
#item ⇒ Object
readonly
Returns the value of attribute item.
-
#max_harvest ⇒ Object
readonly
Returns the value of attribute max_harvest.
-
#natural_gift_power ⇒ Object
readonly
Returns the value of attribute natural_gift_power.
-
#natural_gift_type ⇒ Object
readonly
Returns the value of attribute natural_gift_type.
-
#size ⇒ Object
readonly
Returns the value of attribute size.
-
#smoothness ⇒ Object
readonly
Returns the value of attribute smoothness.
-
#soil_dryness ⇒ Object
readonly
Returns the value of attribute soil_dryness.
Attributes inherited from NamedApiResource
Instance Method Summary collapse
-
#initialize(data) ⇒ Berry
constructor
A new instance of Berry.
Methods inherited from NamedApiResource
Methods included from AssignmentHelpers
assign_list, custom_endpoint_object, endpoint_assignment, get_named_api_resource_from_url, try_to_assign
Constructor Details
#initialize(data) ⇒ Berry
Returns a new instance of Berry.
15 16 17 |
# File 'lib/poke_api/berry.rb', line 15 def initialize(data) assign_data(data) end |
Instance Attribute Details
#firmness ⇒ Object (readonly)
Returns the value of attribute firmness.
4 5 6 |
# File 'lib/poke_api/berry.rb', line 4 def firmness @firmness end |
#flavors ⇒ Object (readonly)
Returns the value of attribute flavors.
4 5 6 |
# File 'lib/poke_api/berry.rb', line 4 def flavors @flavors end |
#growth_time ⇒ Object (readonly)
Returns the value of attribute growth_time.
4 5 6 |
# File 'lib/poke_api/berry.rb', line 4 def growth_time @growth_time end |
#item ⇒ Object (readonly)
Returns the value of attribute item.
4 5 6 |
# File 'lib/poke_api/berry.rb', line 4 def item @item end |
#max_harvest ⇒ Object (readonly)
Returns the value of attribute max_harvest.
4 5 6 |
# File 'lib/poke_api/berry.rb', line 4 def max_harvest @max_harvest end |
#natural_gift_power ⇒ Object (readonly)
Returns the value of attribute natural_gift_power.
4 5 6 |
# File 'lib/poke_api/berry.rb', line 4 def natural_gift_power @natural_gift_power end |
#natural_gift_type ⇒ Object (readonly)
Returns the value of attribute natural_gift_type.
4 5 6 |
# File 'lib/poke_api/berry.rb', line 4 def natural_gift_type @natural_gift_type end |
#size ⇒ Object (readonly)
Returns the value of attribute size.
4 5 6 |
# File 'lib/poke_api/berry.rb', line 4 def size @size end |
#smoothness ⇒ Object (readonly)
Returns the value of attribute smoothness.
4 5 6 |
# File 'lib/poke_api/berry.rb', line 4 def smoothness @smoothness end |
#soil_dryness ⇒ Object (readonly)
Returns the value of attribute soil_dryness.
4 5 6 |
# File 'lib/poke_api/berry.rb', line 4 def soil_dryness @soil_dryness end |