Sha256: fadcede8adf4d038d03488e302aae4e906443003162c151dc0be209a188eca52

Contents?: true

Size: 718 Bytes

Versions: 4

Compression:

Stored size: 718 Bytes

Contents

module RubyFly
  module Commands
    module Mixins
      module Environment
        def initialize(opts = {})
          super(opts)
          @environment = opts[:environment]
        end

        def for_environment(environment)
          @environment = environment
          self
        end

        def configure_command(builder, opts)
          builder = super(builder, opts)
          environment = opts[:environment] || @environment
          if environment
            builder = environment.to_a
                .inject(builder) do |b, environment_variable|
              b.with_environment_variable(*environment_variable)
            end
          end
          builder
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
ruby_fly-0.38.0.pre.2 lib/ruby_fly/commands/mixins/environment.rb
ruby_fly-0.38.0.pre.1 lib/ruby_fly/commands/mixins/environment.rb
ruby_fly-0.37.0 lib/ruby_fly/commands/mixins/environment.rb
ruby_fly-0.36.0.pre.5 lib/ruby_fly/commands/mixins/environment.rb