rdavid1099/poke-api-v2

View on GitHub
lib/poke_api/berry/berry_flavor_map.rb

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
module PokeApi
  class Berry
    # BerryFlavorMap object handling lists of flavors
    class BerryFlavorMap
      attr_reader :flavor,
                  :potency

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