Class: Cuprum::Cli::Dependencies::FileSystem::Mock::MockTempfile
- Inherits:
-
SimpleDelegator
- Object
- SimpleDelegator
- Cuprum::Cli::Dependencies::FileSystem::Mock::MockTempfile
- Defined in:
- lib/cuprum/cli/dependencies/file_system/mock.rb
Overview
Utility class used to simulate tempfile behavior.
Instance Attribute Summary collapse
-
#path ⇒ String
readonly
The qualified path to the tempfile.
Instance Method Summary collapse
-
#initialize(path) ⇒ MockTempfile
constructor
A new instance of MockTempfile.
Constructor Details
#initialize(path) ⇒ MockTempfile
Returns a new instance of MockTempfile.
17 18 19 20 21 |
# File 'lib/cuprum/cli/dependencies/file_system/mock.rb', line 17 def initialize(path) super(StringIO.new) @path = path end |
Instance Attribute Details
#path ⇒ String (readonly)
Returns the qualified path to the tempfile.
24 25 26 |
# File 'lib/cuprum/cli/dependencies/file_system/mock.rb', line 24 def path @path end |