method
generate_properties_with_args
v1_8_7_72 -
Show latest stable
- Class:
WIN32COMGen
generate_properties_with_args(klass, io = STDOUT)public
No documentation available.
# File ext/win32ole/sample/olegen.rb, line 164
def generate_properties_with_args(klass, io = STDOUT)
klass.ole_methods.select {|method|
method.invoke_kind == 'PROPERTYGET' &&
method.visible? &&
method.size_params > 0
}.each do |method|
types = method.return_type_detail
io.puts "\n"
io.puts generate_method_help(method, types[0])
io.puts " def #{method.name}"
if klass.ole_type == "Class"
io.print " OLEProperty.new(@dispatch, #{method.dispid}, ["
else
io.print " OLEProperty.new(self, #{method.dispid}, ["
end
io.print generate_argtypes(method, nil)
io.print "], ["
io.print generate_argtypes(method, types)
io.puts "])"
io.puts " end"
end
end