Method: PoolParty::Resources::Variable#initialize

Defined in:
lib/poolparty/resources/variable.rb

#initialize(k, v = nil, exists = true) ⇒ Variable

Returns a new instance of Variable.



36
37
38
39
40
41
42
43
44
45
46
47
# File 'lib/poolparty/resources/variable.rb', line 36

def initialize(k, v=nil, exists=true)
  case k
  when Hash
    super
  else
    if value.is_a?(Hash)
      super(v.merge(:name => k))
    else
      super({:name => k, :value => v})
    end
  end
end