optional?()
public
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[0]
puts "#{param1.name} #{param1.optional?}"
Show source
/*
* call-seq:
* WIN32OLE_PARAM#optional?
*
* 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[0]
* puts "#{param1.name} #{param1.optional?}" # => Filename true
*/
static VALUE foleparam_optional(self)
VALUE self;
{
struct oleparamdata *pparam;
Data_Get_Struct(self, struct oleparamdata, pparam);
return ole_param_flag_mask(pparam->pTypeInfo, pparam->method_index,
pparam->index, PARAMFLAG_FOPT);
}