class Fission::Lease

def self.all

If there is an error, an unsuccessful Response will be returned.
be an empty Array.
objects. If no leases are found, then the Response's data attribute will
If successful, the Response's data attribute will be an Array of Lease
Returns a Response with the result.

#]
# => [#,
Fission::Lease.all

Examples:

Public: Provides all of the known leases.
def self.all
  response = Response.new
  if File.file? Fission.config['lease_file']
    content = File.read Fission.config['lease_file']
    response.data = content.split('}').collect do |entry|
      parse entry
    end
    content = nil
    response.code = 0
  else
    response.code = 1
    response.message = "Unable to find the lease file '#{Fission.config['lease_file']}'"
  end
  response
end