Class: Cucumber::Core::Test::Action
- Inherits:
-
Object
- Object
- Cucumber::Core::Test::Action
- Defined in:
- lib/cucumber/core/test/action.rb
Direct Known Subclasses
Instance Method Summary collapse
- #execute(*args) ⇒ Object
-
#initialize(&block) ⇒ Action
constructor
A new instance of Action.
- #inspect ⇒ Object
- #location ⇒ Object
- #skip ⇒ Object
Constructor Details
Instance Method Details
#execute(*args) ⇒ Object
20 21 22 23 24 25 26 27 28 |
# File 'lib/cucumber/core/test/action.rb', line 20 def execute(*args) @timer.start @block.call(*args) passed rescue Result::Raisable => exception exception.with_duration(@timer.duration) rescue Exception => exception failed(exception) end |
#inspect ⇒ Object
34 35 36 |
# File 'lib/cucumber/core/test/action.rb', line 34 def inspect "#<#{self.class}: #{location}>" end |
#location ⇒ Object
30 31 32 |
# File 'lib/cucumber/core/test/action.rb', line 30 def location Ast::Location.new(*@block.source_location) end |
#skip ⇒ Object
16 17 18 |
# File 'lib/cucumber/core/test/action.rb', line 16 def skip(*) skipped end |