Module: Cucumber::Parser::Feature::FeatureElements0

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

Instance Method Summary collapse

Instance Method Details

#accept?(filter) ⇒ Boolean

Returns:

  • (Boolean)


585
586
587
# File 'lib/cucumber/parser/feature.rb', line 585

def accept?(filter)
  filter.nil? || elements.empty? || elements.detect{|feature_element| filter.accept?(feature_element)}
end

#build(background, filter) ⇒ Object



589
590
591
592
593
594
595
# File 'lib/cucumber/parser/feature.rb', line 589

def build(background, filter)
  elements.map do |feature_element|
    if filter.nil? || filter.accept?(feature_element)
      feature_element.build(background, filter)
    end
  end.compact
end