Class: Rubycc::Rmake::Executor::LineState

Inherits:
Object
  • Object
show all
Defined in:
lib/rubycc/rmake/executor.rb

Overview

Per-recipe-line mutable state: the working directory a cd in the same line has moved to, and the reason string of the most recent failure (used to enrich CommandFailedError). Each recipe line starts from the Makefile's base directory afresh, matching make running every line in its own shell.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(cwd) ⇒ LineState

Returns a new instance of LineState.



47
48
49
50
# File 'lib/rubycc/rmake/executor.rb', line 47

def initialize(cwd)
  @cwd = cwd
  @failure_reason = nil
end

Instance Attribute Details

#cwdObject

Returns the value of attribute cwd.



45
46
47
# File 'lib/rubycc/rmake/executor.rb', line 45

def cwd
  @cwd
end

#failure_reasonObject

Returns the value of attribute failure_reason.



45
46
47
# File 'lib/rubycc/rmake/executor.rb', line 45

def failure_reason
  @failure_reason
end