Module: Cucumber::Parser::Feature::Background1

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

Instance Method Summary collapse

Instance Method Details

#at_line?(line) ⇒ Boolean

Returns:

  • (Boolean)


506
507
508
509
# File 'lib/cucumber/parser/feature.rb', line 506

def at_line?(line)
  background_keyword.line == line ||
  steps.at_line?(line)
end

#buildObject



515
516
517
518
519
520
521
522
523
# File 'lib/cucumber/parser/feature.rb', line 515

def build
  Ast::Background.new(
    comment.build, 
    background_keyword.line,
    background_keyword.text_value,
    name.build, 
    steps.build
  )
end

#matches_name?(regexp_to_match) ⇒ Boolean

Returns:

  • (Boolean)


502
503
504
# File 'lib/cucumber/parser/feature.rb', line 502

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

#matches_tags?(tag_expression) ⇒ Boolean

Returns:

  • (Boolean)


511
512
513
# File 'lib/cucumber/parser/feature.rb', line 511

def matches_tags?(tag_expression)
  tag_expression.eval(self.parent.tags.tag_names)
end