Class: Script
- Inherits:
-
Object
show all
- Defined in:
- lib/script.rb,
lib/script/version.rb
Defined Under Namespace
Modules: Output
Classes: Engine, Step
Constant Summary
collapse
- VERSION =
"1.0.0"
Class Method Summary
collapse
Instance Method Summary
collapse
Constructor Details
#initialize ⇒ Script
Returns a new instance of Script.
15
16
17
|
# File 'lib/script.rb', line 15
def initialize
@engine = Script::Engine.new
end
|
Class Method Details
.define {|script| ... } ⇒ Object
9
10
11
12
13
|
# File 'lib/script.rb', line 9
def self.define
script = new
yield(script)
script.run
end
|
Instance Method Details
#engine ⇒ Object
19
20
21
|
# File 'lib/script.rb', line 19
def engine
@engine
end
|
#run ⇒ Object
27
28
29
|
# File 'lib/script.rb', line 27
def run
@engine.run
end
|
#step(headline, &block) ⇒ Object
23
24
25
|
# File 'lib/script.rb', line 23
def step(headline, &block)
@engine.register_step(headline, block)
end
|