module Gherkin

Constants

DEFAULT_OPTIONS
DIALECTS
DIALECT_FILE_PATH
RULE_TYPE

Public Class Methods

from_paths(paths, options={}) click to toggle source
# File lib/gherkin.rb, line 10
def self.from_paths(paths, options={})
  Stream::ParserMessageStream.new(
      paths,
      [],
      options
  ).messages
end
from_source(uri, data, options={}) click to toggle source
# File lib/gherkin.rb, line 26
def self.from_source(uri, data, options={})
  from_sources([encode_source_message(uri, data)], options)
end
from_sources(sources, options={}) click to toggle source
# File lib/gherkin.rb, line 18
def self.from_sources(sources, options={})
  Stream::ParserMessageStream.new(
      [],
      sources,
      options
  ).messages
end

Private Class Methods

encode_source_message(uri, data) click to toggle source
# File lib/gherkin.rb, line 32
def self.encode_source_message(uri, data)
  Cucumber::Messages::Source.new(
    uri: uri,
    data: data,
    media_type: 'text/x.cucumber.gherkin+plain'
  )
end