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)


492
493
494
495
# File 'lib/cucumber/parser/feature.rb', line 492

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

#buildObject



507
508
509
510
511
512
513
514
515
# File 'lib/cucumber/parser/feature.rb', line 507

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)


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

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)


497
498
499
500
# File 'lib/cucumber/parser/feature.rb', line 497

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)


488
489
490
# File 'lib/cucumber/parser/feature.rb', line 488

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