Class: WIN32OLE_PARAM

Inherits:
Object
  • Object
show all
Includes:
WIN32OLE::Utils
Defined in:
lib/win32ole/win32ole_param.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from WIN32OLE::Utils

#SafeStringValue, #WIN32OLE_TYPEValue, #all_methods, #all_vars, #find_all_methods_in, #find_all_typeinfo, #load_typelib, #methods_with_flag, #reg_each_key_for, #registry_subkey, #search_registry, #typedesc_value, #typeinfo_from_ole, #typelib_registry_each_guid_version

Constructor Details

#initialize(method, index, param_info = nil) ⇒ WIN32OLE_PARAM

Returns a new instance of WIN32OLE_PARAM.

Raises:

  • (TypeError)


4
5
6
7
8
# File 'lib/win32ole/win32ole_param.rb', line 4

def initialize(method, index, param_info=nil)
  raise TypeError.new("1st parameter must be WIN32OLE object") if !method.kind_of? WIN32OLE_METHOD

  @method, @index, @param = method, index, param_info
end

Instance Attribute Details

#nameObject Also known as: to_s, inspect

Returns the value of attribute name.



2
3
4
# File 'lib/win32ole/win32ole_param.rb', line 2

def name
  @name
end

Instance Method Details

#defaultObject



10
11
12
# File 'lib/win32ole/win32ole_param.rb', line 10

def default
  @param.is_default_value ? RubyWIN32OLE.from_variant(JRuby.runtime, @param.get_default_value) : nil
end

#input?Boolean

Returns:

  • (Boolean)


14
15
16
# File 'lib/win32ole/win32ole_param.rb', line 14

def input?
  @param.is_in
end

#ole_typeObject



24
25
26
# File 'lib/win32ole/win32ole_param.rb', line 24

def ole_type
  typedesc_value(@param.vt)
end

#ole_type_detailObject



28
29
30
# File 'lib/win32ole/win32ole_param.rb', line 28

def ole_type_detail
  typedesc_value(@param.vt, [])
end

#optional?Boolean

Returns:

  • (Boolean)


36
37
38
# File 'lib/win32ole/win32ole_param.rb', line 36

def optional?
  @param.is_optional
end

#output?Boolean

Returns:

  • (Boolean)


32
33
34
# File 'lib/win32ole/win32ole_param.rb', line 32

def output?
  @param.is_out
end

#retval?Boolean

Returns:

  • (Boolean)


40
41
42
# File 'lib/win32ole/win32ole_param.rb', line 40

def retval?
  @param.is_return_value
end