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)


508
509
510
511
# File 'lib/cucumber/parser/feature.rb', line 508

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

#buildObject



523
524
525
526
527
528
529
530
531
# File 'lib/cucumber/parser/feature.rb', line 523

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

#has_all_tags?(tag_names) ⇒ Boolean

Returns:

  • (Boolean)


518
519
520
521
# File 'lib/cucumber/parser/feature.rb', line 518

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

#has_tags?(tag_names) ⇒ Boolean

Returns:

  • (Boolean)


513
514
515
516
# File 'lib/cucumber/parser/feature.rb', line 513

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

#matches_name?(regexp_to_match) ⇒ Boolean

Returns:

  • (Boolean)


504
505
506
# File 'lib/cucumber/parser/feature.rb', line 504

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