value=

WIN32OLE_VARIANT.value = val #=> set WIN32OLE_VARIANT value to val.
Instance Public methods

Sets variant value to val. If the val type does not match variant value type(vartype), then val is changed to match variant value type(vartype) before setting val. Thie method is not available when vartype is VT_ARRAY(except VT_UI1|VT_ARRAY). If the vartype is VT_UI1|VT_ARRAY, the val should be String object.

obj = WIN32OLE_VARIANT.new(1) # obj.vartype is WIN32OLE::VARIANT::VT_I4
obj.value = 3.2 # 3.2 is changed to 3 when setting value.
p obj.value # => 3
doc_ruby_on_rails
2015-06-13 06:14:52
Comments
Leave a Comment

Please login to continue.