Class: PokeApi::Berry

Inherits:
NamedApiResource show all
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

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

#firmnessObject (readonly)

Returns the value of attribute firmness.



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

def firmness
  @firmness
end

#flavorsObject (readonly)

Returns the value of attribute flavors.



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

def flavors
  @flavors
end

#growth_timeObject (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

#itemObject (readonly)

Returns the value of attribute item.



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

def item
  @item
end

#max_harvestObject (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_powerObject (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_typeObject (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

#sizeObject (readonly)

Returns the value of attribute size.



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

def size
  @size
end

#smoothnessObject (readonly)

Returns the value of attribute smoothness.



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

def smoothness
  @smoothness
end

#soil_drynessObject (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