Class: Simmer::Specification::Stage::InputFile
- Inherits:
-
Object
- Object
- Simmer::Specification::Stage::InputFile
- 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
-
#dest ⇒ Object
readonly
Returns the value of attribute dest.
-
#src ⇒ Object
readonly
Returns the value of attribute src.
Instance Method Summary collapse
-
#initialize(dest:, src:) ⇒ InputFile
constructor
A new instance of InputFile.
Constructor Details
#initialize(dest:, src:) ⇒ InputFile
Returns a new instance of InputFile.
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
#dest ⇒ Object (readonly)
Returns the value of attribute dest.
19 20 21 |
# File 'lib/simmer/specification/stage/input_file.rb', line 19 def dest @dest end |
#src ⇒ Object (readonly)
Returns the value of attribute src.
19 20 21 |
# File 'lib/simmer/specification/stage/input_file.rb', line 19 def src @src end |