Class: Antaeus::Resources::User
- Inherits:
-
Antaeus::Resource
- Object
- Antaeus::Resource
- Antaeus::Resources::User
- Defined in:
- lib/antaeus-sdk/resources/user.rb
Instance Attribute Summary
Attributes inherited from Antaeus::Resource
Instance Method Summary collapse
- #memberships ⇒ Object (also: #groups)
Methods inherited from Antaeus::Resource
#<=>, all, delayed_property, #destroy, #fresh?, gen_property_methods, get, human, i18n_key, #id, immutable, #immutable?, immutable?, #initialize, #model_name, #new?, param_key, path, path_for, #path_for, paths, #paths, #persisted?, properties, property, #reload, route_key, #save, search, singular_route_key, #tainted?, #to_key, #to_model, #to_param, #update, where
Constructor Details
This class inherits a constructor from Antaeus::Resource
Instance Method Details
#memberships ⇒ Object Also known as: groups
10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/antaeus-sdk/resources/user.rb', line 10 def memberships ResourceCollection.new( @client.get("/users/#{id}/memberships")['groups'].collect do |record| Group.new( entity: record, lazy: true, tainted: false, client: @client ) end, type: Antaeus::Resources::Group, client: @client ) end |