class Cukedep::FeatureRep
A FeatureRep
is the internal representation of a Gherkin feature.
Constants
- DependencyPrefix
Constant that specifies how dependency tags should begin
- FeatureIdPrefix
Constant that specifies how feature identifier tags should begin
Attributes
identifier[R]
The identifier of the feature. It comes from a tag with the following syntax '@feature:' + identifier. Note that the @feature: prefix is removed.
Public Class Methods
new(theTags)
click to toggle source
@param theTags [Array<String>] the tags objects from the Gherkin parser
# File lib/cukedep/feature-rep.rb, line 23 def initialize(theTags) # Strip first character of tag literal. @tags = theTags.map { |t| t[1..-1] } @identifier = tags.find { |tg| tg =~ FeatureIdPrefix } @identifier = @identifier.sub(FeatureIdPrefix, '') unless identifier.nil? end
Public Instance Methods
anonymous?()
click to toggle source
Return true iff the identifier of the feature is nil.
# File lib/cukedep/feature-rep.rb, line 38 def anonymous? return identifier.nil? end