Class: RiotAPI::Talent
- Inherits:
-
Object
- Object
- RiotAPI::Talent
- Defined in:
- lib/riot_api/talent.rb
Instance Method Summary collapse
-
#initialize(data) ⇒ Talent
constructor
A new instance of Talent.
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 |