Sha256: 132dd3fd02abd25978f379c6b7cefe791cb06ffd802d29650816bb4727966690

Contents?: true

Size: 379 Bytes

Versions: 5

Compression:

Stored size: 379 Bytes

Contents

module ATP
  module Processors
    # Extracts all flags which are set within the given flow, returning
    # them in an array
    class ExtractSetFlags < ATP::Processor
      def run(nodes)
        @results = []
        process_all(nodes)
        @results.uniq
      end

      def on_set_flag(node)
        flag = node.value
        @results << flag
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
atp-1.1.3 lib/atp/processors/extract_set_flags.rb
atp-1.1.2 lib/atp/processors/extract_set_flags.rb
atp-1.1.1 lib/atp/processors/extract_set_flags.rb
atp-1.1.0 lib/atp/processors/extract_set_flags.rb
atp-1.0.0 lib/atp/processors/extract_set_flags.rb