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