Sha256: 9e4abffda997cfc2b5853d20ab79973a0bbd767e263275e104daec1f99c6108f

Contents?: true

Size: 390 Bytes

Versions: 8

Compression:

Stored size: 390 Bytes

Contents

module Pokemon
  class Attack
    attr_accessor :cost, :name, :text, :damage, :converted_energy_cost

    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
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
pokemon_tcg_sdk-4.5.0 lib/pokemon_tcg_sdk/attack.rb
pokemon_tcg_sdk-4.4.0 lib/pokemon_tcg_sdk/attack.rb
pokemon_tcg_sdk-4.3.0 lib/pokemon_tcg_sdk/attack.rb
pokemon_tcg_sdk-4.2.1 lib/pokemon_tcg_sdk/attack.rb
pokemon_tcg_sdk-4.2.0 lib/pokemon_tcg_sdk/attack.rb
pokemon_tcg_sdk-4.1.1 lib/pokemon_tcg_sdk/attack.rb
pokemon_tcg_sdk-4.1.0 lib/pokemon_tcg_sdk/attack.rb
pokemon_tcg_sdk-4.0.0 lib/pokemon_tcg_sdk/attack.rb