Class: RiotAPI::Rune

Inherits:
Object
  • Object
show all
Defined in:
lib/riot_api/rune.rb

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ Rune

Returns a new instance of Rune.



3
4
5
6
7
8
9
10
# File 'lib/riot_api/rune.rb', line 3

def initialize(data)
	data.delete("runeSlotId")
	key = key.underscore
	data.each do |key, value|
		self.class.send(:attr_accessor, key.to_sym)
		instance_variable_set("@#{key}", value)
	end
end