Sha256: 71f34abfa430684288e542f587e6ab55f51e5e014386d5d433e4fec39211340e

Contents?: true

Size: 663 Bytes

Versions: 11

Compression:

Stored size: 663 Bytes

Contents

# frozen_string_literal: true

module RubyLeiningen
  module Commands
    module Mixins
      module Profile
        def initialize(opts = {})
          super(opts)
          @profile = opts[:profile]
        end

        def for_profile(profile)
          @profile = profile
          self
        end

        def configure_command(builder, opts)
          builder = super(builder, opts)
          profile = opts[:profile] || @profile
          if profile
            builder = builder
                      .with_subcommand('with-profile')
                      .with_subcommand(profile)
          end
          builder
        end
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
ruby_leiningen-0.28.0.pre.5 lib/ruby_leiningen/commands/mixins/profile.rb
ruby_leiningen-0.28.0.pre.4 lib/ruby_leiningen/commands/mixins/profile.rb
ruby_leiningen-0.28.0.pre.3 lib/ruby_leiningen/commands/mixins/profile.rb
ruby_leiningen-0.28.0.pre.2 lib/ruby_leiningen/commands/mixins/profile.rb
ruby_leiningen-0.28.0.pre.1 lib/ruby_leiningen/commands/mixins/profile.rb
ruby_leiningen-0.27.0 lib/ruby_leiningen/commands/mixins/profile.rb
ruby_leiningen-0.26.0.pre.2 lib/ruby_leiningen/commands/mixins/profile.rb
ruby_leiningen-0.26.0.pre.1 lib/ruby_leiningen/commands/mixins/profile.rb
ruby_leiningen-0.25.0 lib/ruby_leiningen/commands/mixins/profile.rb
ruby_leiningen-0.24.0.pre.8 lib/ruby_leiningen/commands/mixins/profile.rb
ruby_leiningen-0.24.0.pre.7 lib/ruby_leiningen/commands/mixins/profile.rb