Sha256: 9ccc25e3e337ef64c09309fa332bf79b2fa414fa93d1bd241d82473cc256e0b0

Contents?: true

Size: 1.23 KB

Versions: 10

Compression:

Stored size: 1.23 KB

Contents

module Lucid
  module AST
    class StepResult
      attr_reader :keyword, :step_match, :exception, :status, :background
      attr_reader :step_multiline_class, :file_colon_line

      def initialize(keyword, step_match, multiline_arg, status, exception, source_indent, background, file_colon_line)
        @keyword, @step_match, @multiline_arg, @status, @exception, @source_indent, @background, @file_colon_line = keyword, step_match, multiline_arg, status, exception, source_indent, background, file_colon_line
      end

      def accept(visitor)
        visitor.step_result(self) do
          visitor.visit_step_name(@keyword, @step_match, @status, @source_indent, @background, @file_colon_line)
          visitor.visit_multiline_arg(@multiline_arg) if @multiline_arg
          visitor.visit_exception(@exception, @status) if @exception
        end
      end

      def args
        [@keyword, @step_match, @multiline_arg, @status, @exception, @source_indent, @background, @file_colon_line]
      end

      def step_name
        @step_match.name
      end

      def step_definition
        @step_match.step_definition
      end

      def step_arguments
        @step_match.step_arguments
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
lucid-0.5.1 lib/lucid/ast/step_result.rb
lucid-0.4.1 lib/lucid/ast/step_result.rb
lucid-0.4.0 lib/lucid/ast/step_result.rb
lucid-0.3.3 lib/lucid/ast/step_result.rb
lucid-0.3.0 lib/lucid/ast/step_result.rb
lucid-0.2.1 lib/lucid/ast/step_result.rb
lucid-0.2.0 lib/lucid/ast/step_result.rb
lucid-0.1.1 lib/lucid/ast/step_result.rb
lucid-0.1.0 lib/lucid/ast/step_result.rb
lucid-0.0.9 lib/lucid/ast/step_result.rb