Class: WIN32OLE_PARAM
- Inherits:
-
Object
- Object
- WIN32OLE_PARAM
- Defined in:
- win32ole.c,
win32ole.c
Overview
WIN32OLE_PARAM objects represent param information of
the OLE method.
Instance Method Summary collapse
-
#default ⇒ Object
Returns default value.
-
#input? ⇒ Boolean
Returns true if the parameter is input.
-
#name ⇒ Object
(also: #to_s)
Returns name.
-
#ole_type ⇒ Object
Returns OLE type of WIN32OLE_PARAM object(parameter of OLE method).
-
#ole_type_detail ⇒ Object
Returns detail information of type of argument.
-
#optional? ⇒ Boolean
Returns true if argument is optional.
-
#output? ⇒ Boolean
Returns true if argument is output.
-
#retval? ⇒ Boolean
Returns true if argument is return value.
Instance Method Details
#default ⇒ Object
Returns default value. If the default value does not exist, this method returns nil. tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'Workbook') method = WIN32OLE_METHOD.new(tobj, 'SaveAs') method.params.each do |param| if param.default puts "#WIN32OLE_PARAM.paramparam.name (= #WIN32OLE_PARAM.paramparam.default)" else puts "#param" end end
The above script result is following:
Filename
FileFormat
Password
WriteResPassword
ReadOnlyRecommended
CreateBackup
AccessMode (= 1)
ConflictResolution
AddToMru
TextCodepage
TextVisualLayout
5330 5331 |
# File 'win32ole.c', line 5330 static VALUE foleparam_default(self) VALUE self; |
#input? ⇒ Boolean
Returns true if the parameter is input. tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'Workbook') method = WIN32OLE_METHOD.new(tobj, 'SaveAs') param1 = method.params puts param1.input? # => true
5199 5200 |
# File 'win32ole.c', line 5199 static VALUE foleparam_input(self) VALUE self; |
#name ⇒ Object Also known as: to_s
Returns name. tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'Workbook') method = WIN32OLE_METHOD.new(tobj, 'SaveAs') param1 = method.params puts param1.name # => Filename
5087 5088 5089 |
# File 'win32ole.c', line 5087 static VALUE foleparam_name(self) VALUE self; |
#ole_type ⇒ Object
Returns OLE type of WIN32OLE_PARAM object(parameter of OLE method). tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'Workbook') method = WIN32OLE_METHOD.new(tobj, 'SaveAs') param1 = method.params puts param1.ole_type # => VARIANT
5122 5123 5124 |
# File 'win32ole.c', line 5122 static VALUE foleparam_ole_type(self) VALUE self; |
#ole_type_detail ⇒ Object
Returns detail information of type of argument. tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'IWorksheetFunction') method = WIN32OLE_METHOD.new(tobj, 'SumIf') param1 = method.params p param1.ole_type_detail # => ["PTR", "USERDEFINED", "Range"]
5160 5161 5162 |
# File 'win32ole.c', line 5160 static VALUE foleparam_ole_type_detail(self) VALUE self; |
#optional? ⇒ Boolean
Returns true if argument is optional. tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'Workbook') method = WIN32OLE_METHOD.new(tobj, 'SaveAs') param1 = method.params puts "#WIN32OLE_PARAM.param1param1.name #WIN32OLE_PARAM.param1param1.optional?" # => Filename true
5246 5247 |
# File 'win32ole.c', line 5246 static VALUE foleparam_optional(self) VALUE self; |
#output? ⇒ Boolean
Returns true if argument is output. tobj = WIN32OLE_TYPE.new('Microsoft Internet Controls', 'DWebBrowserEvents') method = WIN32OLE_METHOD.new(tobj, 'NewWindow') method.params.each do |param| puts "#WIN32OLE_PARAM.paramparam.name #WIN32OLE_PARAM.paramparam.output?" end
The result of above script is following:
URL false
Flags false
TargetFrameName false
PostData false
Headers false
Processed true
5227 5228 |
# File 'win32ole.c', line 5227 static VALUE foleparam_output(self) VALUE self; |
#retval? ⇒ Boolean
Returns true if argument is return value. tobj = WIN32OLE_TYPE.new('DirectX 7 for Visual Basic Type Library', 'DirectPlayLobbyConnection') method = WIN32OLE_METHOD.new(tobj, 'GetPlayerShortName') param = method.params puts "#WIN32OLE_PARAM.paramparam.name #WIN32OLE_PARAM.paramparam.retval?" # => name true
5266 5267 |
# File 'win32ole.c', line 5266 static VALUE foleparam_retval(self) VALUE self; |