Class: Cucumber::Formatter::LegacyApi::Ast::HookResult
- Defined in:
- lib/cucumber/formatter/legacy_api/ast.rb
Instance Method Summary collapse
- #accept(formatter) ⇒ Object
- #describe_exception_to(formatter) ⇒ Object
-
#initialize(result, messages, embeddings) ⇒ HookResult
constructor
A new instance of HookResult.
- #send_output_to(formatter) ⇒ Object
Constructor Details
#initialize(result, messages, embeddings) ⇒ HookResult
Returns a new instance of HookResult.
68 69 70 71 |
# File 'lib/cucumber/formatter/legacy_api/ast.rb', line 68 def initialize(result, , ) @result, @messages, @embeddings = result, , @already_accepted = false end |
Instance Method Details
#accept(formatter) ⇒ Object
73 74 75 76 77 78 79 |
# File 'lib/cucumber/formatter/legacy_api/ast.rb', line 73 def accept(formatter) unless @already_accepted send_output_to(formatter) describe_exception_to(formatter) end self end |
#describe_exception_to(formatter) ⇒ Object
88 89 90 91 92 93 |
# File 'lib/cucumber/formatter/legacy_api/ast.rb', line 88 def describe_exception_to(formatter) unless @already_accepted @result.describe_exception_to(formatter) @already_accepted = true end end |
#send_output_to(formatter) ⇒ Object
81 82 83 84 85 86 |
# File 'lib/cucumber/formatter/legacy_api/ast.rb', line 81 def send_output_to(formatter) unless @already_accepted @messages.each { || formatter.puts() } @embeddings.each { || .send_to_formatter(formatter) } end end |