Class: Nanoc::Extra::Piper::Error Private

Inherits:
Int::Errors::Generic
  • Object
show all
Defined in:
lib/nanoc/extra/piper.rb

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Instance Method Summary collapse

Constructor Details

#initialize(command, exit_code) ⇒ Error

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of Error.



7
8
9
10
# File 'lib/nanoc/extra/piper.rb', line 7

def initialize(command, exit_code)
  @command   = command
  @exit_code = exit_code
end

Instance Method Details

#messageObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



12
13
14
# File 'lib/nanoc/extra/piper.rb', line 12

def message
  "command exited with a nonzero status code #{@exit_code} (command: #{@command.join(' ')})"
end