Class: Cuprum::Cli::Dependencies::FileSystem::Mock::MockTempfile

Inherits:
SimpleDelegator
  • Object
show all
Defined in:
lib/cuprum/cli/dependencies/file_system/mock.rb

Overview

Utility class used to simulate tempfile behavior.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(path) ⇒ MockTempfile

Returns a new instance of MockTempfile.

Parameters:

  • path (String)

    the qualified path to the tempfile.



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

#pathString (readonly)

Returns the qualified path to the tempfile.

Returns:

  • (String)

    the qualified path to the tempfile.



24
25
26
# File 'lib/cuprum/cli/dependencies/file_system/mock.rb', line 24

def path
  @path
end