Class: Magi::Executer
- Inherits:
-
Object
- Object
- Magi::Executer
- Defined in:
- lib/magi/executer.rb
Instance Attribute Summary collapse
-
#script ⇒ Object
readonly
Returns the value of attribute script.
Class Method Summary collapse
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(script) ⇒ Executer
constructor
A new instance of Executer.
Constructor Details
#initialize(script) ⇒ Executer
Returns a new instance of Executer.
11 12 13 |
# File 'lib/magi/executer.rb', line 11 def initialize(script) @script = script end |
Instance Attribute Details
#script ⇒ Object (readonly)
Returns the value of attribute script.
9 10 11 |
# File 'lib/magi/executer.rb', line 9 def script @script end |
Class Method Details
.execute(*args) ⇒ Object
5 6 7 |
# File 'lib/magi/executer.rb', line 5 def self.execute(*args) new(*args).execute end |
Instance Method Details
#execute ⇒ Object
15 16 17 |
# File 'lib/magi/executer.rb', line 15 def execute { output: output, status: status.success? } end |