Exception: Freshen::ExecutableError
- Inherits:
-
RuntimeError
- Object
- RuntimeError
- Freshen::ExecutableError
- Defined in:
- lib/freshen/errors.rb
Overview
A RuntimeError subclass for when an executing command fails.
Instance Attribute Summary collapse
-
#args ⇒ Object
readonly
Returns the value of attribute args.
-
#command ⇒ Object
readonly
Returns the value of attribute command.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(name, command, *args) ⇒ ExecutableError
constructor
A new instance of ExecutableError.
- #to_s ⇒ Object
Constructor Details
#initialize(name, command, *args) ⇒ ExecutableError
Returns a new instance of ExecutableError.
73 74 75 76 77 |
# File 'lib/freshen/errors.rb', line 73 def initialize(name, command, *args) @name = name @command = command @args = args.map { |a| a.to_s } end |
Instance Attribute Details
#args ⇒ Object (readonly)
Returns the value of attribute args.
71 72 73 |
# File 'lib/freshen/errors.rb', line 71 def args @args end |
#command ⇒ Object (readonly)
Returns the value of attribute command.
71 72 73 |
# File 'lib/freshen/errors.rb', line 71 def command @command end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
71 72 73 |
# File 'lib/freshen/errors.rb', line 71 def name @name end |
Instance Method Details
#to_s ⇒ Object
79 80 81 82 83 |
# File 'lib/freshen/errors.rb', line 79 def to_s command = Executable.command_string(@command, *@args) "#{@name} freshener failed command '#{command}'" end |