INNER CODE UNIT · Ruby

read_conditionally

stelligent/cfn_nag · lib/cfn-nag/cfn_nag_executor.rb:105

  def read_conditionally(path)
    unless path.nil?
      File.read(path)
    end
  end

  def merge_rule_arguments(opts)
    rule_arguments = {}
    rule_arguments = JSON.parse(@rule_arguments_string) if @rule_arguments_string
    opts[:rule_arguments]&.each do |rule_argument|
      name = rule_argument.split(':')[0]
      value = rule_argument.split(':')[1]
      rule_arguments[name] = value
    end
    rule_arguments
  end

  def cfn_nag_config(opts)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…