Class: NoopBackup::Stores::Result
- Inherits:
-
Struct
- Object
- Struct
- NoopBackup::Stores::Result
- Defined in:
- lib/noop_backup/stores/result.rb
Instance Attribute Summary collapse
-
#bytes ⇒ Object
Returns the value of attribute bytes.
-
#duration ⇒ Object
Returns the value of attribute duration.
-
#error ⇒ Object
Returns the value of attribute error.
-
#key ⇒ Object
Returns the value of attribute key.
-
#store ⇒ Object
Returns the value of attribute store.
-
#success ⇒ Object
Returns the value of attribute success.
Instance Method Summary collapse
Instance Attribute Details
#bytes ⇒ Object
Returns the value of attribute bytes
2 3 4 |
# File 'lib/noop_backup/stores/result.rb', line 2 def bytes @bytes end |
#duration ⇒ Object
Returns the value of attribute duration
2 3 4 |
# File 'lib/noop_backup/stores/result.rb', line 2 def duration @duration end |
#error ⇒ Object
Returns the value of attribute error
2 3 4 |
# File 'lib/noop_backup/stores/result.rb', line 2 def error @error end |
#key ⇒ Object
Returns the value of attribute key
2 3 4 |
# File 'lib/noop_backup/stores/result.rb', line 2 def key @key end |
#store ⇒ Object
Returns the value of attribute store
2 3 4 |
# File 'lib/noop_backup/stores/result.rb', line 2 def store @store end |
#success ⇒ Object
Returns the value of attribute success
2 3 4 |
# File 'lib/noop_backup/stores/result.rb', line 2 def success @success end |
Instance Method Details
#message ⇒ Object
3 4 5 6 7 8 9 |
# File 'lib/noop_backup/stores/result.rb', line 3 def if success "✅ [#{store}] Backup successful — #{NoopBackup.utils.human_size(bytes)} in #{duration.round(1)}s → /#{key}" else "❌ [#{store}] Backup failed: #{error.}" end end |