variable_kind

WIN32OLE_VARIABLE#variable_kind Instance Public methods Returns variable kind string. tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'XlSheetType') variables = tobj.variables variables.each do |variable| puts "#{variable.name} #{variable.variable_kind}" end The result of above script is following: xlChart CONSTANT xlDialogSheet CONSTANT xlExcel4IntlMacroSheet CONSTANT xlExcel4MacroSheet CONSTANT xlWorksheet CONSTANT

value

WIN32OLE_VARIABLE#value Instance Public methods Returns value if value is exists. If the value does not exist, this method returns nil. tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'XlSheetType') variables = tobj.variables variables.each do |variable| puts "#{variable.name} #{variable.value}" end The result of above script is following: xlChart = -4109 xlDialogSheet = -4116 xlExcel4IntlMacroSheet = 4 xlExcel4MacroSheet = 3 xlWorksheet = -4167

to_s

to_s() Instance Public methods Alias for: name

ole_type_detail

WIN32OLE_VARIABLE#ole_type_detail Instance Public methods Returns detail information of type. The information is array of type. tobj = WIN32OLE_TYPE.new('DirectX 7 for Visual Basic Type Library', 'D3DCLIPSTATUS') variable = tobj.variables.find {|variable| variable.name == 'lFlags'} tdetail = variable.ole_type_detail p tdetail # => ["USERDEFINED", "CONST_D3DCLIPSTATUSFLAGS"]

ole_type

WIN32OLE_VARIABLE#ole_type Instance Public methods Returns OLE type string. tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'XlSheetType') variables = tobj.variables variables.each do |variable| puts "#{variable.ole_type} #{variable.name}" end The result of above script is following: INT xlChart INT xlDialogSheet INT xlExcel4IntlMacroSheet INT xlExcel4MacroSheet INT xlWorksheet

name

WIN32OLE_VARIABLE#name Instance Public methods Returns the name of variable. tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'XlSheetType') variables = tobj.variables variables.each do |variable| puts "#{variable.name}" end The result of above script is following: xlChart xlDialogSheet xlExcel4IntlMacroSheet xlExcel4MacroSheet xlWorksheet to_s

inspect

WIN32OLE_VARIABLE#inspect â String Instance Public methods Returns the OLE variable name and the value with class name.

visible?

WIN32OLE_TYPELIB#visible? Instance Public methods Returns true if the type library information is not hidden. If wLibFlags of TLIBATTR is 0 or LIBFLAG_FRESTRICTED or LIBFLAG_FHIDDEN, the method returns false, otherwise, returns true. If the method fails to access the TLIBATTR information, then WIN32OLERuntimeError is raised. tlib = WIN32OLE_TYPELIB.new('Microsoft Excel 9.0 Object Library') tlib.visible? # => true

version

WIN32OLE_TYPELIB#version â The type library version. Instance Public methods Returns the type library version. tlib = WIN32OLE_TYPELIB.new('Microsoft Excel 9.0 Object Library') puts tlib.version #-> 1.3

to_s

to_s() Instance Public methods Alias for: name