ole_types

WIN32OLE_TYPELIB#ole_types â The array of WIN32OLE_TYPE object included the type library. Instance Public methods Returns the type library file path. tlib = WIN32OLE_TYPELIB.new('Microsoft Excel 9.0 Object Library') classes = tlib.ole_types.collect{|k| k.name} # -> ['AddIn', 'AddIns' ...] ole_classes

path

WIN32OLE_TYPELIB#path â The type library file path. Instance Public methods Returns the type library file path. tlib = WIN32OLE_TYPELIB.new('Microsoft Excel 9.0 Object Library') puts tlib.path #-> 'C:\...\EXCEL9.OLB'

to_s

to_s() Instance Public methods Alias for: name

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

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

inspect

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

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

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

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"]

to_s

to_s() Instance Public methods Alias for: name