rdavid1099/poke-api-v2

View on GitHub
lib/poke_api/encounter_condition.rb

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
module PokeApi
  # EncounterCondition object handling all data fetched from /encounter-condition
  class EncounterCondition < NamedApiResource
    attr_reader :names,
                :values

    def initialize(data)
      assign_data(data)
    end

    private

    def custom_endpoint_object
      { values: EncounterConditionValue }
    end
  end
end