Class: Nuke::Client::Parser
- Inherits:
-
Object
- Object
- Nuke::Client::Parser
- Defined in:
- lib/nuke/client/parser.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(paths) ⇒ Parser
constructor
A new instance of Parser.
- #load ⇒ Object
Constructor Details
#initialize(paths) ⇒ Parser
Returns a new instance of Parser.
11 12 13 |
# File 'lib/nuke/client/parser.rb', line 11 def initialize paths @paths = paths end |
Class Method Details
.parse(paths) ⇒ Object
7 8 9 |
# File 'lib/nuke/client/parser.rb', line 7 def self.parse paths new(paths).load end |
Instance Method Details
#load ⇒ Object
15 16 17 18 19 20 21 22 23 |
# 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 |