Module: Cucumber::Parser::Feature::ScenarioOutline1

Defined in:
lib/cucumber/parser/feature.rb

Instance Method Summary collapse

Instance Method Details

#at_line?(line) ⇒ Boolean

Returns:

  • (Boolean)


847
848
849
850
851
# File 'lib/cucumber/parser/feature.rb', line 847

def at_line?(line)
  outline_at_line?(line) ||
  examples_sections.at_line?(line) ||
  tags.at_line?(line)
end

#build(background, filter) ⇒ Object



876
877
878
879
880
881
882
883
884
885
886
887
# File 'lib/cucumber/parser/feature.rb', line 876

def build(background, filter)
  Ast::ScenarioOutline.new(
    background,
    comment.build, 
    tags.build,
    scenario_outline_keyword.line, 
    scenario_outline_keyword.text_value, 
    name.build, 
    steps.build, 
    examples_sections.build(filter, self)
  )
end

#has_all_tags?(tag_names) ⇒ Boolean

Returns:

  • (Boolean)


863
864
865
866
# File 'lib/cucumber/parser/feature.rb', line 863

def has_all_tags?(tag_names)
  feature_tags = self.parent.parent.tags
  tags.has_all_tags?(tag_names) || feature_tags.has_all_tags?(tag_names)
end

#has_tags?(tag_names) ⇒ Boolean

Returns:

  • (Boolean)


858
859
860
861
# File 'lib/cucumber/parser/feature.rb', line 858

def has_tags?(tag_names)
  feature_tags = self.parent.parent.tags
  tags.has_tags?(tag_names) || feature_tags.has_tags?(tag_names)
end

#matches_name?(regexp_to_match) ⇒ Boolean

Returns:

  • (Boolean)


868
869
870
# File 'lib/cucumber/parser/feature.rb', line 868

def matches_name?(regexp_to_match)
  outline_matches_name?(regexp_to_match) || examples_sections.matches_name?(regexp_to_match)
end

#outline_at_line?(line) ⇒ Boolean

Returns:

  • (Boolean)


853
854
855
856
# File 'lib/cucumber/parser/feature.rb', line 853

def outline_at_line?(line)
  scenario_outline_keyword.line == line ||
  steps.at_line?(line)
end

#outline_matches_name?(regexp_to_match) ⇒ Boolean

Returns:

  • (Boolean)


872
873
874
# File 'lib/cucumber/parser/feature.rb', line 872

def outline_matches_name?(regexp_to_match)
  name.build =~ regexp_to_match
end