Sha256: c79bcfca78441d0cade66a2c71be5c0213d432236a3e05e6917fad083f22b452

Contents?: true

Size: 493 Bytes

Versions: 5

Compression:

Stored size: 493 Bytes

Contents

# frozen_string_literal: true

require_relative '../generator'

module Dagger
  module Generate
    # Generate a value for a +string+ rule.
    #
    # _default.key:
    #   - string: "format string"
    #   - string:
    #       - "format string"
    #       - ...
    class String < Dagger::Generator
      def process(strings)
        array(strings).each do |fmtstr|
          result = format_string(fmtstr)
          yield result unless result.nil?
        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/string.rb
ruby-dagger-0.3.3 lib/dagger/generate/string.rb
ruby-dagger-0.3.2 lib/dagger/generate/string.rb
ruby-dagger-0.3.1 lib/dagger/generate/string.rb
ruby-dagger-0.3.0 lib/dagger/generate/string.rb