Class: Round::User
Instance Attribute Summary
Attributes inherited from Base
Class Method Summary collapse
Instance Method Summary collapse
- #devices ⇒ Object
-
#initialize(resource:, client:, **kwargs) ⇒ User
constructor
A new instance of User.
- #wallet ⇒ Object
Methods inherited from Base
association, #hash_identifier, #method_missing, #refresh
Constructor Details
#initialize(resource:, client:, **kwargs) ⇒ User
Returns a new instance of User.
9 10 11 12 |
# File 'lib/round/user.rb', line 9 def initialize(resource:, client:, **kwargs) super @resource.attributes.merge! kwargs end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Round::Base
Class Method Details
.hash_identifier ⇒ Object
5 6 7 |
# File 'lib/round/user.rb', line 5 def self.hash_identifier 'email' end |
Instance Method Details
#devices ⇒ Object
14 15 16 17 18 19 20 21 22 |
# File 'lib/round/user.rb', line 14 def devices resource = @client.resources.devices_query( email: self.email ) Round::DeviceCollection.new( resource: resource, client: @client ) end |
#wallet ⇒ Object
24 25 26 |
# File 'lib/round/user.rb', line 24 def wallet default_wallet end |