Class: Simmer::Specification::Stage::InputFile

Inherits:
Object
  • Object
show all
Defined in:
lib/simmer/specification/stage/input_file.rb

Overview

Describes a file needing to be staged for a specification to execute properly. It understands where the file exists in the local repository and where to transfer it to.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(dest:, src:) ⇒ InputFile

Returns a new instance of InputFile.

Raises:

  • (ArgumentError)


21
22
23
24
25
26
27
28
29
# File 'lib/simmer/specification/stage/input_file.rb', line 21

def initialize(dest:, src:)
  raise ArgumentError, 'dest is required'  if dest.to_s.empty?
  raise ArgumentError, 'src is required'   if src.to_s.empty?

  @dest = dest.to_s
  @src  = src.to_s

  freeze
end

Instance Attribute Details

#destObject (readonly)

Returns the value of attribute dest.



19
20
21
# File 'lib/simmer/specification/stage/input_file.rb', line 19

def dest
  @dest
end

#srcObject (readonly)

Returns the value of attribute src.



19
20
21
# File 'lib/simmer/specification/stage/input_file.rb', line 19

def src
  @src
end