Class: Remocon::Command::Pull::RemoteConfig
- Inherits:
-
Object
- Object
- Remocon::Command::Pull::RemoteConfig
- Includes:
- InterpreterHelper
- Defined in:
- lib/remocon/command/pull_command.rb
Instance Attribute Summary collapse
-
#cmd_opts ⇒ Object
readonly
Returns the value of attribute cmd_opts.
-
#config ⇒ Object
readonly
Returns the value of attribute config.
Instance Method Summary collapse
- #conditions_to_be_compared ⇒ Object
-
#initialize(opts) ⇒ RemoteConfig
constructor
A new instance of RemoteConfig.
- #parameters_to_be_compared ⇒ Object
- #require_conditions_file_path ⇒ Object
- #require_parameters_file_path ⇒ Object
Methods included from InterpreterHelper
#condition_array, #condition_names, #parameter_hash, #read_conditions, #read_parameters
Constructor Details
#initialize(opts) ⇒ RemoteConfig
Returns a new instance of RemoteConfig.
11 12 13 14 |
# File 'lib/remocon/command/pull_command.rb', line 11 def initialize(opts) @config = Remocon::Config.new(opts) @cmd_opts = { validate_only: false } end |
Instance Attribute Details
#cmd_opts ⇒ Object (readonly)
Returns the value of attribute cmd_opts.
9 10 11 |
# File 'lib/remocon/command/pull_command.rb', line 9 def cmd_opts @cmd_opts end |
#config ⇒ Object (readonly)
Returns the value of attribute config.
9 10 11 |
# File 'lib/remocon/command/pull_command.rb', line 9 def config @config end |
Instance Method Details
#conditions_to_be_compared ⇒ Object
24 25 26 |
# File 'lib/remocon/command/pull_command.rb', line 24 def conditions_to_be_compared JSON.parse(JSON.pretty_generate(condition_array.map { |c| c.skip_nil_values.stringify_values })).map(&:with_indifferent_access) end |
#parameters_to_be_compared ⇒ Object
28 29 30 |
# File 'lib/remocon/command/pull_command.rb', line 28 def parameters_to_be_compared JSON.parse(JSON.pretty_generate(parameter_hash.skip_nil_values.stringify_values)).with_indifferent_access end |
#require_conditions_file_path ⇒ Object
20 21 22 |
# File 'lib/remocon/command/pull_command.rb', line 20 def require_conditions_file_path config.conditions_file_path end |
#require_parameters_file_path ⇒ Object
16 17 18 |
# File 'lib/remocon/command/pull_command.rb', line 16 def require_parameters_file_path config.parameters_file_path end |