PokemonTCG/pokemon-tcg-sdk-ruby

View on GitHub
lib/pokemon_tcg_sdk/ability.rb

Summary

Maintainability
A
20 mins
Test Coverage
A
100%
module Pokemon
  class Ability
    attr_accessor :name, :text, :type

    def self.from_json(json)
      ability = Ability.new
      ability.name = json['name']
      ability.text = json['text']
      ability.type = json['type']

      ability
    end
  end
end