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

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

Instance Method Summary collapse

Instance Method Details

#accept?(filter) ⇒ Boolean

Returns:

  • (Boolean)


608
609
610
# File 'lib/cucumber/parser/feature.rb', line 608

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

#build(background, filter) ⇒ Object



612
613
614
615
616
617
618
# File 'lib/cucumber/parser/feature.rb', line 612

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