Sha256: f82fed0d190f243ee1a8886f9ee44892833f0b846e00b87510cdfc38cd397bb0

Contents?: true

Size: 853 Bytes

Versions: 31

Compression:

Stored size: 853 Bytes

Contents

module Cucumber
  module Ast
    class Examples #:nodoc:
      def initialize(comment, line, keyword, name, outline_table)
        @comment, @keyword, @name, @outline_table = comment, keyword, name, outline_table
      end

      def accept(visitor)
        return if $cucumber_interrupted
        visitor.visit_comment(@comment) unless @comment.empty?
        visitor.visit_examples_name(@keyword, @name)
        visitor.visit_outline_table(@outline_table)
      end

      def skip_invoke!
        @outline_table.skip_invoke!
      end

      def each_example_row(&proc)
        @outline_table.cells_rows[1..-1].each(&proc)
      end

      def to_sexp
        sexp = [:examples, @keyword, @name]
        comment = @comment.to_sexp
        sexp += [comment] if comment
        sexp += [@outline_table.to_sexp]
        sexp
      end
    end
  end
end

Version data entries

31 entries across 31 versions & 5 rubygems

Version Path
aslakhellesoy-cucumber-0.3.100 lib/cucumber/ast/examples.rb
aslakhellesoy-cucumber-0.3.101.2 lib/cucumber/ast/examples.rb
aslakhellesoy-cucumber-0.3.101 lib/cucumber/ast/examples.rb
aslakhellesoy-cucumber-0.3.102.1 lib/cucumber/ast/examples.rb
aslakhellesoy-cucumber-0.3.102.2 lib/cucumber/ast/examples.rb
aslakhellesoy-cucumber-0.3.102 lib/cucumber/ast/examples.rb
aslakhellesoy-cucumber-0.3.103 lib/cucumber/ast/examples.rb
aslakhellesoy-cucumber-0.3.104 lib/cucumber/ast/examples.rb
aslakhellesoy-cucumber-0.3.97 lib/cucumber/ast/examples.rb
aslakhellesoy-cucumber-0.3.98 lib/cucumber/ast/examples.rb
aslakhellesoy-cucumber-0.3.99 lib/cucumber/ast/examples.rb
dwaite-cucumber-0.3.101 lib/cucumber/ast/examples.rb
engineyard-cucumber-0.3.101 lib/cucumber/ast/examples.rb
kosmas58-cucumber-0.3.100 lib/cucumber/ast/examples.rb
kosmas58-cucumber-0.3.102 lib/cucumber/ast/examples.rb
kosmas58-cucumber-0.3.103 lib/cucumber/ast/examples.rb
kosmas58-cucumber-0.3.97 lib/cucumber/ast/examples.rb
kosmas58-cucumber-0.3.98 lib/cucumber/ast/examples.rb
kosmas58-cucumber-0.3.99 lib/cucumber/ast/examples.rb
cucumber-0.4.2 lib/cucumber/ast/examples.rb