Class: Pokemon::Attack

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#converted_energy_costObject

Returns the value of attribute converted_energy_cost.



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

def converted_energy_cost
  @converted_energy_cost
end

#costObject

Returns the value of attribute cost.



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

def cost
  @cost
end

#damageObject

Returns the value of attribute damage.



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

def damage
  @damage
end

#nameObject

Returns the value of attribute name.



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

def name
  @name
end

#textObject

Returns the value of attribute text.



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

def text
  @text
end

Class Method Details

.from_json(json) ⇒ Object



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

def self.from_json(json)
  attack = Attack.new
  attack.cost = json['cost']
  attack.name = json['name']
  attack.text = json['text']
  attack.damage = json['damage']
  attack.converted_energy_cost = json['convertedEnergyCost']

  attack
end