Class: Pokemon::Legalities

Inherits:
Object
  • Object
show all
Defined in:
lib/pokemon_tcg_sdk/legalities.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#expandedObject

Returns the value of attribute expanded.



3
4
5
# File 'lib/pokemon_tcg_sdk/legalities.rb', line 3

def expanded
  @expanded
end

#standardObject

Returns the value of attribute standard.



3
4
5
# File 'lib/pokemon_tcg_sdk/legalities.rb', line 3

def standard
  @standard
end

#unlimitedObject

Returns the value of attribute unlimited.



3
4
5
# File 'lib/pokemon_tcg_sdk/legalities.rb', line 3

def unlimited
  @unlimited
end

Class Method Details

.from_json(json) ⇒ Object



5
6
7
8
9
10
11
12
# File 'lib/pokemon_tcg_sdk/legalities.rb', line 5

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

  legality
end