PokemonTCG/pokemon-tcg-sdk-ruby

View on GitHub
lib/pokemon_tcg_sdk/legalities.rb

Summary

Maintainability
A
20 mins
Test Coverage
A
100%
module Pokemon
  class Legalities
    attr_accessor :expanded, :standard, :unlimited

    def self.from_json(json)
      legality = Legalities.new
      legality.expanded = json['expanded']
      legality.standard = json['standard']
      legality.unlimited = json['unlimited']

      legality
    end
  end
end