class Ridley::ClientObject

Public Instance Methods

regenerate_key() click to toggle source

Regenerates the private key of the instantiated client object. The new private key will be set to the value of the 'private_key' accessor of the instantiated client object.

@return [Boolean]

true for success and false for failure
# File lib/ridley/chef_objects/client_object.rb, line 40
def regenerate_key
  self.private_key = true
  self.save
end
to_json() click to toggle source

Override to_json to reflect to massage the returned attributes based on the type of connection. Only OHC/OPC requires the json_class attribute is not present.

Calls superclass method
# File lib/ridley/chef_objects/client_object.rb, line 47
def to_json
  if resource.connection.hosted?
    to_hash.except(:json_class).to_json
  else
    super
  end
end