Sha256: 1f7402cc637db311bd7846260680ee8ba5c4c1b45638d1561161ab148eb55d26

Contents?: true

Size: 488 Bytes

Versions: 1

Compression:

Stored size: 488 Bytes

Contents

require_relative '../generator'

module Dagger
  module Generate
    # Set requirement for further processing.
    #
    # _default.key:
    #   - require:
    #       key: regexp
    #   - ...
    class Require < Dagger::Generator
      def process(keys)
        stop unless keys.any? do |key, regexps|
          string = dictionary[key]
          enumerable(regexps).any? do |regexp|
            ::Regexp.new(regexp).match?(string)
          end
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ruby-dagger-0.1.1 lib/dagger/generator/require.rb