rdavid1099/poke-api-v2

View on GitHub
lib/poke_api/evolution_trigger.rb

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
module PokeApi
  # EvolutionTrigger object handling all data fetched from /evolution-trigger
  class EvolutionTrigger < NamedApiResource
    attr_reader :names,
                :pokemon_species

    def initialize(data)
      assign_data(data)
    end

    private

    def custom_endpoint_object
      {
        baby_trigger_item: Item
      }
    end
  end
end