rdavid1099/poke-api-v2

View on GitHub
lib/poke_api/ability/ability_pokemon.rb

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
module PokeApi
  class Ability
    # AbilityPokemon object handling all data fetched from /ability pokemon
    class AbilityPokemon
      attr_reader :is_hidden,
                  :slot,
                  :pokemon

      def initialize(data)
        @is_hidden = data[:is_hidden]
        @slot = data[:slot]
        @pokemon = Pokemon.new(data[:pokemon])
      end
    end
  end
end