PokemonTCG/pokemon-tcg-sdk-ruby

View on GitHub
lib/pokemon_tcg_sdk/weakness.rb

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
module Pokemon
  class Weakness
    attr_accessor :type, :value

    def self.from_json(json)
      weakness = Weakness.new
      weakness.type = json['type']
      weakness.value = json['value']

      weakness
    end
  end
end