Sha256: 79ee1c59dbc84cd7571d7510eddda5b24d0640ccc66cb574e38448803a87a0ff

Contents?: true

Size: 1.09 KB

Versions: 18

Compression:

Stored size: 1.09 KB

Contents

require 'r10k/logging'
require 'r10k/util/setopts'

module R10K
  module Action
    class Base

      include R10K::Logging
      include R10K::Util::Setopts

      attr_accessor :settings

      # @param opts [Hash] A hash of options defined in #allowed_initialized_opts
      #   and managed by the SetOps mixin within the Action::Base class.
      #   Corresponds to the CLI flags and options.
      # @param argv [Enumerable] Typically CRI::ArgumentList or Array. A list-like
      #   collection of the remaining arguments to the CLI invocation (after
      #   removing flags and options).
      # @param settings [Hash] A hash of configuration loaded from the relevant
      #   config (r10k.yaml).
      #
      # @note All arguments will be required in the next major version
      def initialize(opts, argv, settings = {})
        @opts = opts
        @argv = argv
        @settings = settings

        setopts(opts, allowed_initialize_opts)
      end

      private

      def allowed_initialize_opts
        {
          :config => true,
          :trace  => true,
        }
      end
    end
  end
end

Version data entries

18 entries across 18 versions & 2 rubygems

Version Path
r10k-5.0.0 lib/r10k/action/base.rb
r10k-4.1.0 lib/r10k/action/base.rb
r10k-4.0.2 lib/r10k/action/base.rb
r10k-4.0.1 lib/r10k/action/base.rb
r10k-4.0.0 lib/r10k/action/base.rb
r10k-4.0.0.pre lib/r10k/action/base.rb
r10k-3.16.0 lib/r10k/action/base.rb
r10k-3.15.4 lib/r10k/action/base.rb
r10k-3.15.3 lib/r10k/action/base.rb
r10k-3.15.2 lib/r10k/action/base.rb
r10k-3.15.1 lib/r10k/action/base.rb
r10k-3.15.0 lib/r10k/action/base.rb
akerl-r10k-3.14.2.1 lib/r10k/action/base.rb
r10k-3.14.2 lib/r10k/action/base.rb
r10k-3.14.1 lib/r10k/action/base.rb
r10k-3.14.0 lib/r10k/action/base.rb
r10k-3.13.0 lib/r10k/action/base.rb
r10k-3.12.1 lib/r10k/action/base.rb