Class: Pokemon::Resistance

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#typeObject

Returns the value of attribute type.



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

def type
  @type
end

#valueObject

Returns the value of attribute value.



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

def value
  @value
end

Class Method Details

.from_json(json) ⇒ Object



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

def self.from_json(json)
  resistance = Resistance.new
  resistance.type = json['type']
  resistance.value = json['value']

  resistance
end