rdavid1099/poke-api-v2

View on GitHub
lib/poke_api/berry_flavor.rb

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
module PokeApi
  # BerryFlavor object handling all data fetched from /berry-flavor
  class BerryFlavor < NamedApiResource
    attr_reader :berries,
                :contest_type,
                :names

    def initialize(data)
      assign_data(data)
    end

    private

    def custom_endpoint_object
      { berries: FlavorBerryMap }
    end
  end
end