Class: RiotAPI::RunePage
- Inherits:
-
Object
- Object
- RiotAPI::RunePage
- Defined in:
- lib/riot_api/rune_page.rb
Instance Attribute Summary collapse
-
#slots ⇒ Object
Returns the value of attribute slots.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(data) ⇒ RunePage
constructor
A new instance of RunePage.
Constructor Details
#initialize(data) ⇒ RunePage
Returns a new instance of RunePage.
5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/riot_api/rune_page.rb', line 5 def initialize(data) data.each do |key, value| key = key.underscore if key == "slots" self.slots = value else self.class.send(:attr_accessor, key.to_sym) instance_variable_set("@#{key}", value) end end end |
Instance Attribute Details
#slots ⇒ Object
Returns the value of attribute slots.
3 4 5 |
# File 'lib/riot_api/rune_page.rb', line 3 def slots @slots end |