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

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

Instance Method Summary collapse

Instance Method Details

#accept?(filter) ⇒ Boolean

Returns:

  • (Boolean)


619
620
621
# File 'lib/cucumber/parser/feature.rb', line 619

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

#build(background, filter) ⇒ Object



623
624
625
626
627
628
629
# File 'lib/cucumber/parser/feature.rb', line 623

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