Class: R10K::Source::Exec
Constant Summary
Constants included from Logging
Logging::LOG_LEVELS, Logging::SYSLOG_LEVELS_MAP
Instance Attribute Summary
Attributes inherited from Base
#basedir, #name, #prefix, #puppetfile_name
Instance Method Summary collapse
- #environments_hash ⇒ Object
-
#initialize(name, basedir, options = {}) ⇒ Exec
constructor
A new instance of Exec.
Methods inherited from Hash
#desired_contents, #environments, #set_environments_hash, valid_environments_hash?
Methods inherited from Base
#accept, #environments, #preload!, #reload!
Methods included from Logging
add_outputters, debug_formatter, default_formatter, default_outputter, #logger, #logger_name, parse_level
Constructor Details
#initialize(name, basedir, options = {}) ⇒ Exec
Returns a new instance of Exec.
8 9 10 11 12 13 14 15 16 |
# File 'lib/r10k/source/exec.rb', line 8 def initialize(name, basedir, = {}) unless @command = [:command] raise ConfigError, _('Environment source %{name} missing required parameter: command') % {name: name} end # We haven't set the environments option yet. We will do that by # overloading the #environments method. super(name, basedir, ) end |
Instance Method Details
#environments_hash ⇒ Object
18 19 20 |
# File 'lib/r10k/source/exec.rb', line 18 def environments_hash @environments_hash ||= set_environments_hash(run_environments_command) end |