class Nuke::Client::Parser

Public Class Methods

new(paths) click to toggle source
# File lib/nuke/client/parser.rb, line 11
def initialize paths
  @paths = paths
end
parse(paths) click to toggle source
# File lib/nuke/client/parser.rb, line 7
def self.parse paths
  new(paths).load
end

Public Instance Methods

load() click to toggle source
# File lib/nuke/client/parser.rb, line 15
def load
  @paths.inject([]) do |features, path|
    Dir.glob(File.join(path, "**/*.feature")) do |feature_path|
      gherkin = Nuke::ParsesFeatures.new.parse(File.read feature_path)
      features << {:path => feature_path, :gherkin => gherkin}
    end
    features
  end
end