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
Returns a new instance of 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
25 26 |
# File 'lib/jcukeforker/formatters/scenario_line_logger.rb', line 25 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 23 |
# File 'lib/jcukeforker/formatters/scenario_line_logger.rb', line 12 def visit_feature_element(feature_element) if @tag_expression.evaluate(feature_element.) if feature_element.respond_to?(:each_example_row) feature_element.each_example_row do |row| #TODO remove reflection build_scenario(feature_element, row.instance_variable_get(:@cells).first) end else build_scenario(feature_element, feature_element) end end end |