Class: Duse::Client::User
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, ignore_in_json, #initialize, #load_attribute, many, #missing?, one, #reload, #save, #set_attribute, subclasses, #to_h
Instance Method Details
#public_key ⇒ Object
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
|
#server? ⇒ Boolean
22
23
24
|
# File 'lib/duse/client/user.rb', line 22
def server?
'server' == self.username
end
|