Sha256: c0b972a82edec9997c691163d50004369a9262d348d8e31db208b8608b94300b

Contents?: true

Size: 575 Bytes

Versions: 1

Compression:

Stored size: 575 Bytes

Contents

require_relative 'gherkin_9_adapter'


module CukeModeler

  # NOT A PART OF THE PUBLIC API
  # An adapter that can convert the output of version 18.x of the *cucumber-gherkin* gem into input that is consumable
  # by this gem.
  class Gherkin18Adapter < Gherkin9Adapter

    # Adapts the AST sub-tree that is rooted at the given rule node.
    def adapt_rule(rule_ast)
      adapted_rule = super(rule_ast)

      # Tagging of Rules was added in Gherkin 18
      adapted_rule['tags'] = adapt_tags(rule_ast[:rule])

      adapted_rule
    end

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
cuke_modeler-3.9.0 lib/cuke_modeler/adapters/gherkin_18_adapter.rb