Method: CIM::Variant#initialize

Defined in:
lib/cim/variant.rb

#initialize(type = :null, value = nil) ⇒ Variant

Creates a typed value

type: See CIM::Type value: A Ruby value

No attempt is made to check if the type matches the value.



24
25
26
27
# File 'lib/cim/variant.rb', line 24

def initialize type = :null, value = nil
  @type = (type.kind_of? CIM::Type) ? type : CIM::Type.new(type)
  @value = value unless value == :null
end