Class: Burner::SideEffects::WrittenFile

Inherits:
Object
  • Object
show all
Defined in:
lib/burner/side_effects/written_file.rb

Overview

Describes a file that was generated by a Job. If a Job emits a file, it should also add the file details to the Payload#side_effects array using the Payload#add_side_effect method.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(logical_filename:, physical_filename:, time_in_seconds:) ⇒ WrittenFile

Returns a new instance of WrittenFile.



19
20
21
22
23
24
25
# File 'lib/burner/side_effects/written_file.rb', line 19

def initialize(logical_filename:, physical_filename:, time_in_seconds:)
  @logical_filename  = logical_filename.to_s
  @physical_filename = physical_filename.to_s
  @time_in_seconds   = time_in_seconds.to_f

  freeze
end

Instance Attribute Details

#logical_filenameObject (readonly)

Returns the value of attribute logical_filename.



15
16
17
# File 'lib/burner/side_effects/written_file.rb', line 15

def logical_filename
  @logical_filename
end

#physical_filenameObject (readonly)

Returns the value of attribute physical_filename.



15
16
17
# File 'lib/burner/side_effects/written_file.rb', line 15

def physical_filename
  @physical_filename
end

#time_in_secondsObject (readonly)

Returns the value of attribute time_in_seconds.



15
16
17
# File 'lib/burner/side_effects/written_file.rb', line 15

def time_in_seconds
  @time_in_seconds
end