Sha256: 41c55584a902cc3c50441e95bb07bad5a84fc2cd4dd84900da6df7ca97a2bbdd

Contents?: true

Size: 309 Bytes

Versions: 4

Compression:

Stored size: 309 Bytes

Contents

require "gherkin/parser"
require 'turnip/node/feature'

module Turnip
  class Builder
    def self.build(feature_file)
      parser = Gherkin::Parser.new
      result = parser.parse(File.read(feature_file))

      return nil unless result[:feature]
      Node::Feature.new(result[:feature])
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
turnip-3.1.0 lib/turnip/builder.rb
turnip-3.0.0 lib/turnip/builder.rb
turnip-3.0.0.pre.beta.5 lib/turnip/builder.rb
turnip-3.0.0.pre.beta.4 lib/turnip/builder.rb