Class: Build::BuildTask::CommandFailure

Inherits:
Graph::TransientError
  • Object
show all
Defined in:
lib/build/build_node.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(task, arguments, status) ⇒ CommandFailure

Returns a new instance of CommandFailure.



75
76
77
78
79
80
81
# File 'lib/build/build_node.rb', line 75

def initialize(task, arguments, status)
	@task = task
	@arguments = arguments
	@status = status
	
	super "#{File.basename(executable_name).inspect} exited with status #{@status.to_i}"
end

Instance Attribute Details

#argumentsObject (readonly)

Returns the value of attribute arguments.



92
93
94
# File 'lib/build/build_node.rb', line 92

def arguments
  @arguments
end

#statusObject (readonly)

Returns the value of attribute status.



93
94
95
# File 'lib/build/build_node.rb', line 93

def status
  @status
end

#taskObject (readonly)

Returns the value of attribute task.



91
92
93
# File 'lib/build/build_node.rb', line 91

def task
  @task
end

Instance Method Details

#executable_nameObject



83
84
85
86
87
88
89
# File 'lib/build/build_node.rb', line 83

def executable_name
	if @arguments[0].kind_of? Hash
		@arguments[1]
	else
		@arguments[0]
	end
end