Results for: "minmax"

Returns the netmask address of ifaddr. nil is returned if netmask is not available in ifaddr.

returns the socket family as an integer.

p Socket::Option.new(:INET6, :IPV6, :RECVPKTINFO, [1].pack("i!")).family
#=> 10

Returns a string which shows sockopt in human-readable form.

p Socket::Option.new(:INET, :SOCKET, :KEEPALIVE, [1].pack("i")).inspect
#=> "#<Socket::Option: INET SOCKET KEEPALIVE 1>"

Creates a new Socket::Option object which contains an int as data.

The size and endian is dependent on the platform.

p Socket::Option.int(:INET, :SOCKET, :KEEPALIVE, 1)
#=> #<Socket::Option: INET SOCKET KEEPALIVE 1>

Returns the data in sockopt as an int.

The size and endian is dependent on the platform.

sockopt = Socket::Option.int(:INET, :SOCKET, :KEEPALIVE, 1)
p sockopt.int => 1

Creates a new Socket::Option object for SOL_SOCKET/SO_LINGER.

onoff should be an integer or a boolean.

secs should be the number of seconds.

p Socket::Option.linger(true, 10)
#=> #<Socket::Option: UNSPEC SOCKET LINGER on 10sec>

Returns the linger data in sockopt as a pair of boolean and integer.

sockopt = Socket::Option.linger(true, 10)
p sockopt.linger => [true, 10]
No documentation available

Returns key information as Array of: :num_keys

The number of subkeys.

:max_key_length

Maximum length of name of subkeys.

:num_values

The number of values.

:max_value_name_length

Maximum length of name of values.

:max_value_length

Maximum length of value of values.

:descriptor_length

Length of security descriptor.

:wtime

Last write time as FILETIME(64-bit integer)

For detail, see RegQueryInfoKey Win32 API.

Returns help string of OLE method. If the help string is not found, then the method returns nil.

tobj = WIN32OLE::Type.new('Microsoft Internet Controls', 'IWebBrowser')
method = WIN32OLE::Method.new(tobj, 'Navigate')
puts method.helpstring # => Navigates to a URL or file.

Returns the method name with class name.

Returns true if the parameter is input.

tobj = WIN32OLE::Type.new('Microsoft Excel 9.0 Object Library', 'Workbook')
method = WIN32OLE::Method.new(tobj, 'SaveAs')
param1 = method.params[0]
puts param1.input? # => true

Returns the parameter name with class name. If the parameter has default value, then returns name=value string with class name.

Returns the OLE struct name and member name and the value of member

If COM server in VB.NET ComServer project is the following:

Imports System.Runtime.InteropServices
Public Class ComClass
    <MarshalAs(UnmanagedType.BStr)> _
    Public title As String
    Public cost As Integer
End Class

then

srver = WIN32OLE.new('ComServer.ComClass')
obj = WIN32OLE::Record.new('Book', server)
obj.inspect # => <WIN32OLE::Record(ComClass) {"title" => nil, "cost" => nil}>

Returns number which represents type.

tobj = WIN32OLE::Type.new('Microsoft Word 10.0 Object Library', 'Documents')
puts tobj.typekind # => 4

Returns help string.

tobj = WIN32OLE::Type.new('Microsoft Internet Controls', 'IWebBrowser')
puts tobj.helpstring # => Web Browser interface

Returns the type name with class name.

ie = WIN32OLE.new('InternetExplorer.Application')
ie.ole_type.inspect => #<WIN32OLE::Type:IWebBrowser2>

Returns the type library name with class name.

tlib = WIN32OLE::TypeLib.new('Microsoft Excel 9.0 Object Library')
tlib.inspect # => "<#WIN32OLE::TypeLib:Microsoft Excel 9.0 Object Library>"

Returns the number which represents variable kind.

tobj = WIN32OLE::Type.new('Microsoft Excel 9.0 Object Library', 'XlSheetType')
variables = tobj.variables
variables.each do |variable|
  puts "#{variable.name} #{variable.varkind}"
end

The result of above script is following:
   xlChart 2
   xlDialogSheet 2
   xlExcel4IntlMacroSheet 2
   xlExcel4MacroSheet 2
   xlWorksheet 2

Returns the OLE variable name and the value with class name.

Returns true if the stream is finished.

Finishes the stream and flushes output buffer. If a block is given each chunk is yielded to the block until the input buffer has been flushed to the output buffer.

Decompresses string. Raises a Zlib::NeedDict exception if a preset dictionary is needed for decompression.

This method is almost equivalent to the following code:

def inflate(string)
  zstream = Zlib::Inflate.new
  buf = zstream.inflate(string)
  zstream.finish
  zstream.close
  buf
end

See also Zlib.deflate

Inputs deflate_string into the inflate stream and returns the output from the stream. Calling this method, both the input and the output buffer of the stream are flushed. If string is nil, this method finishes the stream, just like Zlib::ZStream#finish.

If a block is given consecutive inflated chunks from the deflate_string are yielded to the block and nil is returned.

If a :buffer keyword argument is given and not nil:

Raises a Zlib::NeedDict exception if a preset dictionary is needed to decompress. Set the dictionary by Zlib::Inflate#set_dictionary and then call this method again with an empty string to flush the stream:

inflater = Zlib::Inflate.new

begin
  out = inflater.inflate compressed
rescue Zlib::NeedDict
  # ensure the dictionary matches the stream's required dictionary
  raise unless inflater.adler == Zlib.adler32(dictionary)

  inflater.set_dictionary dictionary
  inflater.inflate ''
end

# ...

inflater.close

See also Zlib::Inflate.new

Closes the GzipFile object. Unlike Zlib::GzipFile#close, this method never calls the close method of the associated IO object. Returns the associated IO object.

Search took: 4ms  ·  Total Results: 1823