Class: Deis::Client::User

Inherits:
Cistern::Model
  • Object
show all
Defined in:
lib/deis/client/models/user.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#passwordObject

Returns the value of attribute password.



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

def password
  @password
end

Instance Method Details

#saveObject



15
16
17
18
19
20
21
22
23
24
25
# File 'lib/deis/client/models/user.rb', line 15

def save
  if new_record?
    merge_attributes(
      connection.register_user(
        Cistern::Hash.stringify_keys(self.attributes.merge("password" => self.password))
      ).body
    )
  else
    raise NotImplementedError # not available ?
  end
end