class Klaro::Client::Resource
Public Class Methods
dress(data, client)
click to toggle source
# File lib/klaro/client/resource.rb, line 18 def dress(data, client) new(symbolize_keys(data), client) end
new(data, client)
click to toggle source
Calls superclass method
# File lib/klaro/client/resource.rb, line 5 def initialize(data, client) super(data) @client = client end
symbolize_keys(data)
click to toggle source
# File lib/klaro/client/resource.rb, line 12 def symbolize_keys(data) Hash[data.each_pair.map{|k,v| [k.to_sym, v] }] end