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)


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

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

#buildObject



498
499
500
501
502
503
504
505
506
# File 'lib/cucumber/parser/feature.rb', line 498

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)


485
486
487
# File 'lib/cucumber/parser/feature.rb', line 485

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

#matches_tags?(tag_names) ⇒ Boolean

Returns:

  • (Boolean)


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

def matches_tags?(tag_names)
  Ast::Tags.matches?(self.parent.tags.tag_names, tag_names)
end