Class: Tent::Status::User
- Inherits:
-
Object
- Object
- Tent::Status::User
- Includes:
- DataMapper::Resource
- Defined in:
- lib/tent-status/models/user.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.find_or_create(params) ⇒ Object
22 23 24 |
# File 'lib/tent-status/models/user.rb', line 22 def self.find_or_create(params) first(:entity => params[:entity]) || create(params) end |
Instance Method Details
#auth_details ⇒ Object
26 27 28 29 30 31 32 |
# File 'lib/tent-status/models/user.rb', line 26 def auth_details { :mac_key_id => mac_key_id, :mac_key => mac_key, :mac_algorithm => mac_algorithm } end |
#basic_profile ⇒ Object
34 35 36 |
# File 'lib/tent-status/models/user.rb', line 34 def basic_profile (profile || {})['https://tent.io/types/info/basic/v0.1.0'] || {} end |