Class: ColdStorage::Archiver::Result

Inherits:
Struct
  • Object
show all
Defined in:
lib/cold_storage/archiver.rb

Overview

Outcome of one call.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#archivedObject

Returns the value of attribute archived

Returns:

  • (Object)

    the current value of archived



20
21
22
# File 'lib/cold_storage/archiver.rb', line 20

def archived
  @archived
end

#deletedObject

Returns the value of attribute deleted

Returns:

  • (Object)

    the current value of deleted



20
21
22
# File 'lib/cold_storage/archiver.rb', line 20

def deleted
  @deleted
end

#dry_runObject

Returns the value of attribute dry_run

Returns:

  • (Object)

    the current value of dry_run



20
21
22
# File 'lib/cold_storage/archiver.rb', line 20

def dry_run
  @dry_run
end

#model_nameObject

Returns the value of attribute model_name

Returns:

  • (Object)

    the current value of model_name



20
21
22
# File 'lib/cold_storage/archiver.rb', line 20

def model_name
  @model_name
end

#reasonObject

Returns the value of attribute reason

Returns:

  • (Object)

    the current value of reason



20
21
22
# File 'lib/cold_storage/archiver.rb', line 20

def reason
  @reason
end

#skippedObject

Returns the value of attribute skipped

Returns:

  • (Object)

    the current value of skipped



20
21
22
# File 'lib/cold_storage/archiver.rb', line 20

def skipped
  @skipped
end

Instance Method Details

#skipped?Boolean

Returns:

  • (Boolean)


21
22
23
# File 'lib/cold_storage/archiver.rb', line 21

def skipped?
  skipped
end

#to_sObject



25
26
27
28
29
# File 'lib/cold_storage/archiver.rb', line 25

def to_s
  return "#{model_name}: skipped (#{reason})" if skipped?

  "#{model_name}: archived #{archived}, deleted #{deleted}#{' [dry run]' if dry_run}"
end