Class: Stamina::Command::Run
- Inherits:
-
Object
- Object
- Stamina::Command::Run
- Includes:
- Robustness
- Defined in:
- lib/stamina-core/stamina/command/run.rb
Overview
Run a file with the Stamina Engine
SYNOPSIS
stamina #{command_name} FILE
OPTIONS #summarized_options
Instance Attribute Summary collapse
-
#images ⇒ Object
Returns the value of attribute images.
-
#output ⇒ Object
Returns the value of attribute output.
Instance Method Summary collapse
-
#execute(args) ⇒ Object
Command execution.
Methods included from Robustness
#assert_readable_file, #assert_writable_file
Instance Attribute Details
#images ⇒ Object
Returns the value of attribute images.
16 17 18 |
# File 'lib/stamina-core/stamina/command/run.rb', line 16 def images @images end |
#output ⇒ Object
Returns the value of attribute output.
15 16 17 |
# File 'lib/stamina-core/stamina/command/run.rb', line 15 def output @output end |
Instance Method Details
#execute(args) ⇒ Object
Command execution
45 46 47 48 49 50 51 |
# File 'lib/stamina-core/stamina/command/run.rb', line 45 def execute(args) raise Quickl::Help unless args.size == 1 assert_readable_file(file = args.first) context = Stamina::Engine.execute(File.read(file), file) do_output(context, File.dirname(file)) context end |