Class: JCukeForker::Formatters::ScenarioLineLogger
- Inherits:
-
Object
- Object
- JCukeForker::Formatters::ScenarioLineLogger
- Defined in:
- lib/jcukeforker/formatters/scenario_line_logger.rb
Instance Attribute Summary collapse
-
#scenarios ⇒ Object
readonly
Returns the value of attribute scenarios.
Instance Method Summary collapse
-
#initialize(tag_expression = Gherkin::TagExpression.new([])) ⇒ ScenarioLineLogger
constructor
A new instance of ScenarioLineLogger.
- #method_missing(*args) ⇒ Object
- #visit_feature_element(feature_element) ⇒ Object
Constructor Details
#initialize(tag_expression = Gherkin::TagExpression.new([])) ⇒ ScenarioLineLogger
7 8 9 10 |
# File 'lib/jcukeforker/formatters/scenario_line_logger.rb', line 7 def initialize(tag_expression = Gherkin::TagExpression.new([])) @scenarios = [] @tag_expression = tag_expression end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(*args) ⇒ Object
24 25 |
# File 'lib/jcukeforker/formatters/scenario_line_logger.rb', line 24 def method_missing(*args) end |
Instance Attribute Details
#scenarios ⇒ Object (readonly)
Returns the value of attribute scenarios.
5 6 7 |
# File 'lib/jcukeforker/formatters/scenario_line_logger.rb', line 5 def scenarios @scenarios end |
Instance Method Details
#visit_feature_element(feature_element) ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/jcukeforker/formatters/scenario_line_logger.rb', line 12 def visit_feature_element(feature_element) if @tag_expression.evaluate(feature_element.) line_number = if feature_element.respond_to?(:line) feature_element.line else feature_element.location.line end @scenarios << [feature_element.feature.file, line_number].join(':') end end |