Class: Pokemon::Weakness
- Inherits:
-
Object
- Object
- Pokemon::Weakness
- Defined in:
- lib/pokemon_tcg_sdk/weakness.rb
Instance Attribute Summary collapse
-
#type ⇒ Object
Returns the value of attribute type.
-
#value ⇒ Object
Returns the value of attribute value.
Class Method Summary collapse
Instance Attribute Details
#type ⇒ Object
Returns the value of attribute type.
3 4 5 |
# File 'lib/pokemon_tcg_sdk/weakness.rb', line 3 def type @type end |
#value ⇒ Object
Returns the value of attribute value.
3 4 5 |
# File 'lib/pokemon_tcg_sdk/weakness.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/weakness.rb', line 5 def self.from_json(json) weakness = Weakness.new weakness.type = json['type'] weakness.value = json['value'] weakness end |