Class: Cucumber::Ast::Tags
Overview
Holds the names of tags parsed from a feature file:
@invoice @release_2
This gets stored internally as ["invoice", "release_2"]
Instance Method Summary collapse
- #accept(visitor) ⇒ Object
-
#initialize(line, tag_names) ⇒ Tags
constructor
A new instance of Tags.
- #to_sexp ⇒ Object
Constructor Details
#initialize(line, tag_names) ⇒ Tags
Returns a new instance of Tags.
10 11 12 |
# File 'lib/cucumber/ast/tags.rb', line 10 def initialize(line, tag_names) @line, @tag_names = line, tag_names end |
Instance Method Details
#accept(visitor) ⇒ Object
14 15 16 17 18 |
# File 'lib/cucumber/ast/tags.rb', line 14 def accept(visitor) @tag_names.each do |tag_name| visitor.visit_tag_name(tag_name) end end |
#to_sexp ⇒ Object
20 21 22 |
# File 'lib/cucumber/ast/tags.rb', line 20 def to_sexp @tag_names.map{|tag_name| [:tag, tag_name]} end |