Class: Sxn::Security::SecureFileCopier::CopyResult
- Inherits:
-
Object
- Object
- Sxn::Security::SecureFileCopier::CopyResult
- Defined in:
- lib/sxn/security/secure_file_copier.rb
Overview
File operation result
Instance Attribute Summary collapse
-
#checksum ⇒ Object
readonly
Returns the value of attribute checksum.
-
#destination_path ⇒ Object
readonly
Returns the value of attribute destination_path.
-
#duration ⇒ Object
readonly
Returns the value of attribute duration.
-
#encrypted ⇒ Object
readonly
Returns the value of attribute encrypted.
-
#operation ⇒ Object
readonly
Returns the value of attribute operation.
-
#source_path ⇒ Object
readonly
Returns the value of attribute source_path.
Instance Method Summary collapse
-
#initialize(source_path, destination_path, operation, encrypted: false, checksum: nil, duration: 0) ⇒ CopyResult
constructor
A new instance of CopyResult.
- #to_h ⇒ Object
Constructor Details
#initialize(source_path, destination_path, operation, encrypted: false, checksum: nil, duration: 0) ⇒ CopyResult
Returns a new instance of CopyResult.
23 24 25 26 27 28 29 30 |
# File 'lib/sxn/security/secure_file_copier.rb', line 23 def initialize(source_path, destination_path, operation, encrypted: false, checksum: nil, duration: 0) @source_path = source_path @destination_path = destination_path @operation = operation @encrypted = encrypted @checksum = checksum @duration = duration end |
Instance Attribute Details
#checksum ⇒ Object (readonly)
Returns the value of attribute checksum.
21 22 23 |
# File 'lib/sxn/security/secure_file_copier.rb', line 21 def checksum @checksum end |
#destination_path ⇒ Object (readonly)
Returns the value of attribute destination_path.
21 22 23 |
# File 'lib/sxn/security/secure_file_copier.rb', line 21 def destination_path @destination_path end |
#duration ⇒ Object (readonly)
Returns the value of attribute duration.
21 22 23 |
# File 'lib/sxn/security/secure_file_copier.rb', line 21 def duration @duration end |
#encrypted ⇒ Object (readonly)
Returns the value of attribute encrypted.
21 22 23 |
# File 'lib/sxn/security/secure_file_copier.rb', line 21 def encrypted @encrypted end |
#operation ⇒ Object (readonly)
Returns the value of attribute operation.
21 22 23 |
# File 'lib/sxn/security/secure_file_copier.rb', line 21 def operation @operation end |
#source_path ⇒ Object (readonly)
Returns the value of attribute source_path.
21 22 23 |
# File 'lib/sxn/security/secure_file_copier.rb', line 21 def source_path @source_path end |
Instance Method Details
#to_h ⇒ Object
32 33 34 35 36 37 38 39 40 41 |
# File 'lib/sxn/security/secure_file_copier.rb', line 32 def to_h { source_path: @source_path, destination_path: @destination_path, operation: @operation, encrypted: @encrypted, checksum: @checksum, duration: @duration } end |