lib/helium/user.rb in helium-ruby-0.4.0 vs lib/helium/user.rb in helium-ruby-0.5.0
- old
+ new
@@ -1,13 +1,13 @@
module Helium
class User < Resource
attr_reader :name, :email
- def initialize(client:, params:)
- super(client: client, params: params)
+ def initialize(opts = {})
+ super(opts)
- @name = params.dig('attributes', 'name')
- @email = params.dig('meta', 'email')
+ @name = @params.dig('attributes', 'name')
+ @email = @params.dig('meta', 'email')
end
# TODO can probably generalize this a bit more
def as_json
super.merge({