Class: Duse::Client::User

Inherits:
Entity
  • Object
show all
Defined in:
lib/duse/client/user.rb

Constant Summary

Constants inherited from Entity

Entity::MAP

Instance Attribute Summary

Attributes inherited from Entity

#attributes, #curry

Instance Method Summary collapse

Methods inherited from Entity

add_attribute, attributes, base_path, #delete, id_field, #initialize, #load_attribute, many, #missing?, one, #reload, #save, #set_attribute, subclasses

Constructor Details

This class inherits a constructor from Duse::Client::Entity

Instance Method Details

#public_keyObject



13
14
15
# File 'lib/duse/client/user.rb', line 13

def public_key
  OpenSSL::PKey::RSA.new load_attribute 'public_key'
end

#public_key=(public_key) ⇒ Object



17
18
19
20
# File 'lib/duse/client/user.rb', line 17

def public_key=(public_key)
  public_key = public_key.to_s if public_key.is_a? OpenSSL::PKey::RSA
  set_attribute('public_key', public_key)
end