Module: Cfhighlander::Helper

Defined in:
lib/cfhighlander.helper.rb

Class Method Summary collapse

Class Method Details

.parameter_cfndsl_value(value, nested = false) ⇒ Object



7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/cfhighlander.helper.rb', line 7

def self.parameter_cfndsl_value(value, nested = false)

  if value.class == String
    return "'#{value}'"
  end

  if value.class == Hash
    return value if nested
    return value.to_json
  end

  if value.class == Array
    return value.collect { |it| self.parameter_cfndsl_value(it, nested = true) }
  end

  return "'#{value}'"

end