Class: Pokemon::Attack
- Inherits:
-
Object
- Object
- Pokemon::Attack
- Defined in:
- lib/pokemon_tcg_sdk/attack.rb
Instance Attribute Summary collapse
-
#converted_energy_cost ⇒ Object
Returns the value of attribute converted_energy_cost.
-
#cost ⇒ Object
Returns the value of attribute cost.
-
#damage ⇒ Object
Returns the value of attribute damage.
-
#name ⇒ Object
Returns the value of attribute name.
-
#text ⇒ Object
Returns the value of attribute text.
Class Method Summary collapse
Instance Attribute Details
#converted_energy_cost ⇒ Object
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 |
#cost ⇒ Object
Returns the value of attribute cost.
3 4 5 |
# File 'lib/pokemon_tcg_sdk/attack.rb', line 3 def cost @cost end |
#damage ⇒ Object
Returns the value of attribute damage.
3 4 5 |
# File 'lib/pokemon_tcg_sdk/attack.rb', line 3 def damage @damage end |
#name ⇒ Object
Returns the value of attribute name.
3 4 5 |
# File 'lib/pokemon_tcg_sdk/attack.rb', line 3 def name @name end |
#text ⇒ Object
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 |