Returns WIN32OLE::Method
object corresponding with method specified by 1st argument.
excel = WIN32OLE.new('Excel.Application') method = excel.ole_method_help('Quit')
Invoked as a callback whenever a singleton method is added to the receiver.
module Chatty def Chatty.singleton_method_added(id) puts "Adding #{id.id2name}" end def self.one() end def two() end def Chatty.three() end end
produces:
Adding singleton_method_added Adding one Adding three
Invoked as a callback whenever a singleton method is removed from the receiver.
module Chatty def Chatty.singleton_method_removed(id) puts "Removing #{id.id2name}" end def self.one() end def two() end def Chatty.three() end class << self remove_method :three remove_method :one end end
produces:
Removing three Removing one
Invoked as a callback whenever a singleton method is undefined in the receiver.
module Chatty def Chatty.singleton_method_undefined(id) puts "Undefining #{id.id2name}" end def Chatty.one() end class << self undef_method(:one) end end
produces:
Undefining one
Enable to measure GC time. You can get the result with GC.stat(:time)
. Note that GC time measurement can cause some performance overhead.
Return measure_total_time
flag (default: true
). Note that measurement can affect the application performance.
Glob pattern for require-able plugin suffixes.
Suffixes for dynamic library require-able paths.
Mirror the Prism.parse_file_comments
API by using the serialization API. This uses native strings instead of Ruby strings because it allows us to use mmap when it is available.
Generates a random prime number of bit length bits. If safe is set to true
, generates a safe prime. If add is specified, generates a prime that fulfills condition p % add = rem
.
Sets the cipher’s additional authenticated data. This field must be set when using AEAD cipher modes such as GCM or CCM. If no associated data shall be used, this method must still be called with a value of “”. The contents of this field should be non-sensitive data which will be added to the ciphertext to generate the authentication tag which validates the contents of the ciphertext.
The AAD must be set prior to encryption or decryption. In encryption mode, it must be set after calling Cipher#encrypt
and setting Cipher#key=
and Cipher#iv=
. When decrypting, the authenticated data must be set after key, iv and especially after the authentication tag has been set. I.e. set it only after calling Cipher#decrypt
, Cipher#key=
, Cipher#iv=
and Cipher#auth_tag=
first.
Parse and return a Time
from string
Returns the size of arguments of the method.
tobj = WIN32OLE::Type.new('Microsoft Excel 9.0 Object Library', 'Workbook') method = WIN32OLE::Method.new(tobj, 'SaveAs') puts method.size_params # => 11
Returns value specified by the member name of VT_RECORD OLE variable. Or sets value specified by the member name of VT_RECORD OLE variable. If the member name is not correct, KeyError
exception is raised.
If COM server in VB.NET ComServer project is the following:
Imports System.Runtime.InteropServices Public Class ComClass Public Structure Book <MarshalAs(UnmanagedType.BStr)> _ Public title As String Public cost As Integer End Structure End Class
Then getting/setting value from Ruby is as the following:
obj = WIN32OLE.new('ComServer.ComClass') book = WIN32OLE::Record.new('Book', obj) book.title # => nil ( book.method_missing(:title) is invoked. ) book.title = "Ruby" # ( book.method_missing(:title=, "Ruby") is invoked. )
Returns array of WIN32OLE::Method
objects which represent OLE method defined in OLE type library.
tobj = WIN32OLE::Type.new('Microsoft Excel 9.0 Object Library', 'Worksheet') methods = tobj.ole_methods.collect{|m| m.name } # => ['Activate', 'Copy', 'Delete',....]
Attach the list of comments to their respective locations in the tree.