Class: Build::Task::CommandFailure
- Inherits:
-
Graph::TransientError
- Object
- Graph::TransientError
- Build::Task::CommandFailure
- Defined in:
- lib/build/task.rb
Instance Attribute Summary collapse
-
#arguments ⇒ Object
readonly
Returns the value of attribute arguments.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
-
#task ⇒ Object
readonly
Returns the value of attribute task.
Instance Method Summary collapse
- #executable_name ⇒ Object
-
#initialize(task, arguments, status) ⇒ CommandFailure
constructor
A new instance of CommandFailure.
Constructor Details
#initialize(task, arguments, status) ⇒ CommandFailure
Returns a new instance of CommandFailure.
28 29 30 31 32 33 34 |
# File 'lib/build/task.rb', line 28 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
#arguments ⇒ Object (readonly)
Returns the value of attribute arguments.
45 46 47 |
# File 'lib/build/task.rb', line 45 def arguments @arguments end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
46 47 48 |
# File 'lib/build/task.rb', line 46 def status @status end |
#task ⇒ Object (readonly)
Returns the value of attribute task.
44 45 46 |
# File 'lib/build/task.rb', line 44 def task @task end |
Instance Method Details
#executable_name ⇒ Object
36 37 38 39 40 41 42 |
# File 'lib/build/task.rb', line 36 def executable_name if @arguments[0].kind_of? Hash @arguments[1] else @arguments[0] end end |