Class: Pokemon::AncientTrait

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#nameObject

Returns the value of attribute name.



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

def name
  @name
end

#textObject

Returns the value of attribute text.



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

def text
  @text
end

Class Method Details

.from_json(json) ⇒ Object



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

def self.from_json(json)
  trait = AncientTrait.new
  trait.name = json['name']
  trait.text = json['text']

  trait
end