Sha256: 051b900a7cae83df2267b0fb80c56f79a9ccfb8f8601358b9a1d9f761f4b252c

Contents?: true

Size: 650 Bytes

Versions: 5

Compression:

Stored size: 650 Bytes

Contents

# frozen_string_literal: true

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

        def for_profile(profile)
          @profile = profile
          self
        end

        def configure_command(initial_builder, opts)
          builder = super
          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

5 entries across 5 versions & 1 rubygems

Version Path
ruby_leiningen-0.30.0.pre.2 lib/ruby_leiningen/commands/mixins/profile.rb
ruby_leiningen-0.30.0.pre.1 lib/ruby_leiningen/commands/mixins/profile.rb
ruby_leiningen-0.29.0 lib/ruby_leiningen/commands/mixins/profile.rb
ruby_leiningen-0.28.0.pre.7 lib/ruby_leiningen/commands/mixins/profile.rb
ruby_leiningen-0.28.0.pre.6 lib/ruby_leiningen/commands/mixins/profile.rb