This method is called when a parse error is found.
ERROR_TOKEN_ID is an internal ID of token which caused error. You can get string representation of this ID by calling token_to_str
.
ERROR_VALUE is a value of error token.
value_stack is a stack of symbol values. DO NOT MODIFY this object.
This method raises ParseError
by default.
If this method returns, parsers enter “error recovering mode”.
Returns event interface name if the method is event.
tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'Workbook') method = WIN32OLE_METHOD.new(tobj, 'SheetActivate') puts method.event_interface # => WorkbookEvents
Returns major version.
tobj = WIN32OLE_TYPE.new('Microsoft Word 10.0 Object Library', 'Documents') puts tobj.major_version # => 8
Returns minor version.
tobj = WIN32OLE_TYPE.new('Microsoft Word 10.0 Object Library', 'Documents') puts tobj.minor_version # => 2
Returns the type library major version.
tlib = WIN32OLE_TYPELIB.new('Microsoft Excel 9.0 Object Library') puts tlib.major_version # -> 1
Returns the type library minor version.
tlib = WIN32OLE_TYPELIB.new('Microsoft Excel 9.0 Object Library') puts tlib.minor_version # -> 3
See Zlib::GzipReader
documentation for a description.
Read from buffer a value of type
at offset
. data_type
should be one of symbols:
:U8
: unsigned integer, 1 byte
:S8
: signed integer, 1 byte
:u16
: unsigned integer, 2 bytes, little-endian
:U16
: unsigned integer, 2 bytes, big-endian
:s16
: signed integer, 2 bytes, little-endian
:S16
: signed integer, 2 bytes, big-endian
:u32
: unsigned integer, 4 bytes, little-endian
:U32
: unsigned integer, 4 bytes, big-endian
:s32
: signed integer, 4 bytes, little-endian
:S32
: signed integer, 4 bytes, big-endian
:u64
: unsigned integer, 8 bytes, little-endian
:U64
: unsigned integer, 8 bytes, big-endian
:s64
: signed integer, 8 bytes, little-endian
:S64
: signed integer, 8 bytes, big-endian
:f32
: float, 4 bytes, little-endian
:F32
: float, 4 bytes, big-endian
:f64
: double, 8 bytes, little-endian
:F64
: double, 8 bytes, big-endian
A data type refers specifically to the type of binary data that is stored in the buffer. For example, a :u32
data type is a 32-bit unsigned integer in little-endian format.
Example:
string = [1.5].pack('f') # => "\x00\x00\xC0?" IO::Buffer.for(string).get_value(:f32, 0) # => 1.5
Similar to get_value
, except that it can handle multiple data types and returns an array of values.
Example:
string = [1.5, 2.5].pack('ff') IO::Buffer.for(string).get_values([:f32, :f32], 0) # => [1.5, 2.5]
Read a chunk or all of the buffer into a string, in the specified encoding
. If no encoding is provided Encoding::BINARY
is used.
buffer = IO::Buffer.for('test') buffer.get_string # => "test" buffer.get_string(2) # => "st" buffer.get_string(2, 1) # => "s"
Returns true
if this is a header row, false
otherwise.