Class: Spinach::Parser
- Inherits:
-
Object
- Object
- Spinach::Parser
- Defined in:
- lib/spinach/parser.rb,
lib/spinach/parser/visitor.rb
Overview
Parser leverages GherkinRuby to parse the feature definition.
Defined Under Namespace
Classes: Visitor
Instance Attribute Summary collapse
-
#content ⇒ String
readonly
Gets the plain text content out of the feature file.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(content) ⇒ Parser
constructor
A new instance of Parser.
-
#parse ⇒ Feature
Parses the feature file and returns a Feature.
Constructor Details
#initialize(content) ⇒ Parser
Returns a new instance of Parser.
12 13 14 |
# File 'lib/spinach/parser.rb', line 12 def initialize(content) @content = content end |
Instance Attribute Details
#content ⇒ String (readonly)
Gets the plain text content out of the feature file.
30 31 32 |
# File 'lib/spinach/parser.rb', line 30 def content @content end |
Class Method Details
.open_file(filename) ⇒ Object
20 21 22 |
# File 'lib/spinach/parser.rb', line 20 def self.open_file(filename) new File.read(filename) end |