Sha256: 16eb961b9b25316bfccf416dd1fe6c2c1e25920e288eed56ceba4df0a4769806

Contents?: true

Size: 425 Bytes

Versions: 5

Compression:

Stored size: 425 Bytes

Contents

# frozen_string_literal: true

require_relative '../generator'

module Dagger
  module Generate
    # Set requirement for further processing.
    #
    # _default.key:
    #   - require_name: regexp
    #   - ...
    class RequireName < Dagger::Generator
      def process(regexps)
        stop unless array(regexps).any? do |regexp|
          ::Regexp.new(regexp).match?(vertex.name)
        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
ruby-dagger-0.4.0 lib/dagger/generate/require_name.rb
ruby-dagger-0.3.3 lib/dagger/generate/require_name.rb
ruby-dagger-0.3.2 lib/dagger/generate/require_name.rb
ruby-dagger-0.3.1 lib/dagger/generate/require_name.rb
ruby-dagger-0.3.0 lib/dagger/generate/require_name.rb