Class: Elm::Runnable
- Inherits:
-
Object
- Object
- Elm::Runnable
- Includes:
- Contracts::Builtin, Contracts::Core
- Defined in:
- lib/elm/runnable.rb
Overview
Run command
Constant Summary collapse
- RunStatus =
Or[RunSuccess, RunError]
Instance Method Summary collapse
-
#initialize(command) ⇒ Runnable
constructor
A new instance of Runnable.
- #run(options) ⇒ Object
Constructor Details
#initialize(command) ⇒ Runnable
Returns a new instance of Runnable.
42 43 44 45 46 47 48 49 50 51 |
# File 'lib/elm/runnable.rb', line 42 def initialize(command) @command = command unless exists? raise ExecutableNotFoundError, "Please install executable '#{@command}'" end self end |
Instance Method Details
#run(options) ⇒ Object
54 55 56 |
# File 'lib/elm/runnable.rb', line 54 def run run [] end |