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

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

Instance Method Summary collapse

Instance Method Details

#accept?(filter) ⇒ Boolean

Returns:

  • (Boolean)


624
625
626
# File 'lib/cucumber/parser/feature.rb', line 624

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

#build(background, filter) ⇒ Object



628
629
630
631
632
633
634
# File 'lib/cucumber/parser/feature.rb', line 628

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