Class: Script::Step
- Inherits:
-
Object
- Object
- Script::Step
- Defined in:
- lib/script/step.rb
Instance Method Summary collapse
- #headline ⇒ Object
-
#initialize(headline, block) ⇒ Step
constructor
A new instance of Step.
- #result ⇒ Object
- #run ⇒ Object
Constructor Details
#initialize(headline, block) ⇒ Step
Returns a new instance of Step.
2 3 4 5 |
# File 'lib/script/step.rb', line 2 def initialize(headline, block) @headline = headline @block = block end |
Instance Method Details
#headline ⇒ Object
18 19 20 |
# File 'lib/script/step.rb', line 18 def headline @headline end |
#result ⇒ Object
14 15 16 |
# File 'lib/script/step.rb', line 14 def result @result end |
#run ⇒ Object
7 8 9 10 11 12 |
# File 'lib/script/step.rb', line 7 def run @block.call @result = :succeded rescue @result = :failed end |