Class: Cucumber::Ast::Tags
Overview
:nodoc:
Instance Attribute Summary collapse
-
#tag_names ⇒ Object
readonly
Returns the value of attribute tag_names.
Instance Method Summary collapse
- #accept(visitor) ⇒ Object
- #accept_hook?(hook) ⇒ Boolean
-
#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.
6 7 8 |
# File 'lib/cucumber/ast/tags.rb', line 6 def initialize(line, tag_names) @line, @tag_names = line, tag_names end |
Instance Attribute Details
#tag_names ⇒ Object (readonly)
Returns the value of attribute tag_names.
4 5 6 |
# File 'lib/cucumber/ast/tags.rb', line 4 def tag_names @tag_names end |
Instance Method Details
#accept(visitor) ⇒ Object
10 11 12 13 14 15 |
# File 'lib/cucumber/ast/tags.rb', line 10 def accept(visitor) return if Cucumber.wants_to_quit @tag_names.each do |tag_name| visitor.visit_tag_name(tag_name) end end |
#accept_hook?(hook) ⇒ Boolean
17 18 19 |
# File 'lib/cucumber/ast/tags.rb', line 17 def accept_hook?(hook) TagExpression.parse(hook.tag_expressions).eval(@tag_names) end |
#to_sexp ⇒ Object
21 22 23 |
# File 'lib/cucumber/ast/tags.rb', line 21 def to_sexp @tag_names.map{|tag_name| [:tag, tag_name]} end |