Sha256: 4bceff3f0da5bd2773281cbd752795d015a57453702f8ee056b751770a7548e4

Contents?: true

Size: 1.17 KB

Versions: 2

Compression:

Stored size: 1.17 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.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

      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

2 entries across 2 versions & 1 rubygems

Version Path
lucid-0.0.8 lib/lucid/ast/step_result.rb
lucid-0.0.7 lib/lucid/ast/step_result.rb