Class: LinkedData::Client::Models::User
- Includes:
- Collection, ReadWrite
- Defined in:
- lib/ontologies_api_client/models/user.rb
Constant Summary
Constants included from ReadWrite
Constants inherited from Base
Instance Attribute Summary
Attributes inherited from Base
#context, #instance_values, #links
Class Method Summary collapse
Instance Method Summary collapse
Methods included from ReadWrite
#changed_values, #delete, #save, #update, #update_from_params
Methods included from Collection
Methods inherited from Base
#[], #[]=, attributes, class_for_type, #explore, #id, #initialize, #marshal_dump, #marshal_load, #method_missing, #respond_to?, #to_hash, #to_jsonld, #type
Constructor Details
This class inherits a constructor from LinkedData::Client::Base
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class LinkedData::Client::Base
Class Method Details
.authenticate(user, password) ⇒ Object
14 15 16 17 |
# File 'lib/ontologies_api_client/models/user.rb', line 14 def self.authenticate(user, password) auth_params = {user: user, password: password, include: "all"} LinkedData::Client::HTTP.post("#{LinkedData::Client.settings.rest_url}/users/authenticate", auth_params) end |
Instance Method Details
#admin? ⇒ Boolean
19 20 21 |
# File 'lib/ontologies_api_client/models/user.rb', line 19 def admin? respond_to?(:role) && role.include?("ADMINISTRATOR") end |