Class: RiotAPI::Talent

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

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ Talent

Returns a new instance of Talent.



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

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