Class: WIN32OLE_VARIABLE
Instance Attribute Summary collapse
-
#name ⇒ Object
(also: #to_s)
readonly
Returns the value of attribute name.
Instance Method Summary
collapse
#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(type, var_desc, name) ⇒ WIN32OLE_VARIABLE
Returns a new instance of WIN32OLE_VARIABLE.
6
7
8
|
# File 'lib/win32ole/win32ole_variable.rb', line 6
def initialize(type, var_desc, name)
@type, @var_desc, @name = type, var_desc, name
end
|
Instance Attribute Details
#name ⇒ Object
Also known as:
to_s
Returns the value of attribute name.
4
5
6
|
# File 'lib/win32ole/win32ole_variable.rb', line 4
def name
@name
end
|
Instance Method Details
#inspect ⇒ Object
42
43
44
|
# File 'lib/win32ole/win32ole_variable.rb', line 42
def inspect
"#<WIN32OLE_VARIABLE:#{to_s}=#{value.inspect}>"
end
|
#ole_type ⇒ Object
10
11
12
|
# File 'lib/win32ole/win32ole_variable.rb', line 10
def ole_type
@type.ole_type end
|
#ole_type_detail ⇒ Object
14
15
16
17
|
# File 'lib/win32ole/win32ole_variable.rb', line 14
def ole_type_detail
[@type.ole_type]
end
|
#value ⇒ Object
19
20
21
|
# File 'lib/win32ole/win32ole_variable.rb', line 19
def value
RubyWIN32OLE.from_variant(JRuby.runtime, @var_desc.constant)
end
|
#variable_kind ⇒ Object
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
# File 'lib/win32ole/win32ole_variable.rb', line 23
def variable_kind
case varkind
when VarDesc::VAR_PERINSTANCE then
"PERINSTANCE"
when VarDesc::VAR_STATIC then
"STATIC"
when VarDesc::VAR_CONST then
"CONSTANT"
when VarDesc::VAR_DISPATCH then
"DISPATCH"
else
"UNKNOWN"
end
end
|
#varkind ⇒ Object
38
39
40
|
# File 'lib/win32ole/win32ole_variable.rb', line 38
def varkind
@var_desc.varkind
end
|
#visible? ⇒ Boolean
48
49
50
51
|
# File 'lib/win32ole/win32ole_variable.rb', line 48
def visible?
flags = @var_desc.flags
flags & (VarDesc::VARFLAG_FHIDDEN | VarDesc::VARFLAG_FRESTRICTED | VarDesc::VARFLAG_FNONBROWSABLE) == 0
end
|