rdavid1099/poke-api-v2

View on GitHub
lib/poke_api/encounter_condition_value.rb

Summary

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

    def initialize(data)
      assign_data(data)
    end

    private

    def custom_endpoint_object
      {
        condition: EncounterCondition
      }
    end
  end
end