Sha256: 28105bddcdf7456a2a5107fedf0c15a300af7ba57263462ea8e128cda013aef2
Contents?: true
Size: 608 Bytes
Versions: 10
Compression:
Stored size: 608 Bytes
Contents
module Helium class User < Resource attr_reader :name, :email, :pending_invite alias_method :pending_invite?, :pending_invite def initialize(opts = {}) super(opts) @name = @params.dig('attributes', 'name') @email = @params.dig('meta', 'email') @pending_invite = @params.dig('meta', 'pending_invite') end def resource_path "/user" end # TODO can probably generalize this a bit more def as_json super.merge({ name: name, email: email, pending_invite: pending_invite }) end end end
Version data entries
10 entries across 10 versions & 1 rubygems