Sha256: 7d5c85a8e0f1360939c64bf7b717fd88ceeffbe9327f4424e2a8e9c22398a7ca

Contents?: true

Size: 748 Bytes

Versions: 75

Compression:

Stored size: 748 Bytes

Contents

module PkgForge
  ##
  # Add configure flag options to Forge
  class Forge
    attr_writer :configure_flags

    Contract None => HashOf[Symbol => Maybe[String]]
    def configure_flags
      @configure_flags ||= {}
    end
  end

  module DSL
    ##
    # Add configure flag options to Forge DSL
    class Forge
      Contract HashOf[Symbol => Maybe[String]] => nil
      def configure_flags(value)
        @forge.configure_flags = value
        nil
      end
    end

    ##
    # Add configure flag options to Build DSL
    class Build
      Contract None => ArrayOf[String]
      def configure_flag_strings
        @forge.configure_flags.map do |flag, value|
          "--#{flag}#{'=' if value}#{value}"
        end
      end
    end
  end
end

Version data entries

75 entries across 75 versions & 1 rubygems

Version Path
pkgforge-0.29.1 lib/pkgforge/components/configure.rb
pkgforge-0.29.0 lib/pkgforge/components/configure.rb
pkgforge-0.28.0 lib/pkgforge/components/configure.rb
pkgforge-0.27.0 lib/pkgforge/components/configure.rb
pkgforge-0.26.0 lib/pkgforge/components/configure.rb
pkgforge-0.25.1 lib/pkgforge/components/configure.rb
pkgforge-0.25.0 lib/pkgforge/components/configure.rb
pkgforge-0.24.1 lib/pkgforge/components/configure.rb
pkgforge-0.24.0 lib/pkgforge/components/configure.rb
pkgforge-0.23.2 lib/pkgforge/components/configure.rb
pkgforge-0.23.1 lib/pkgforge/components/configure.rb
pkgforge-0.23.0 lib/pkgforge/components/configure.rb
pkgforge-0.22.0 lib/pkgforge/components/configure.rb
pkgforge-0.21.0 lib/pkgforge/components/configure.rb
pkgforge-0.20.0 lib/pkgforge/components/configure.rb
pkgforge-0.19.0 lib/pkgforge/components/configure.rb
pkgforge-0.18.0 lib/pkgforge/components/configure.rb
pkgforge-0.17.0 lib/pkgforge/components/configure.rb
pkgforge-0.16.1 lib/pkgforge/components/configure.rb
pkgforge-0.16.0 lib/pkgforge/components/configure.rb