Class: Remocon::Command::Pull::RemoteConfig

Inherits:
Object
  • Object
show all
Includes:
InterpreterHelper
Defined in:
lib/remocon/command/pull_command.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_optsObject (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

#configObject (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_comparedObject



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_comparedObject



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_pathObject



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_pathObject



16
17
18
# File 'lib/remocon/command/pull_command.rb', line 16

def require_parameters_file_path
  config.parameters_file_path
end