bool

Socket::Option.bool(family, level, optname, bool) => sockopt Class Public methods Creates a new Socket::Option object which contains boolean as data. Actually 0 or 1 as int is used. p Socket::Option.bool(:INET, :SOCKET, :KEEPALIVE, true) #=> #<Socket::Option: INET SOCKET KEEPALIVE 1> p Socket::Option.bool(:INET, :SOCKET, :KEEPALIVE, false) #=> #<Socket::Option: AF_INET SOCKET KEEPALIVE 0>

malloc_allocated_size

GC.malloc_allocated_size â Integer Class Public methods Returns the size of memory allocated by malloc(). Only available if ruby was built with CALC_EXACT_MALLOC_SIZE.

b

str.b â str Instance Public methods Returns a copied string whose encoding is ASCII-8BIT.

create

create() Class Public methods

type_id

type_id(name) Class Public methods

values_at

hsh.values_at(key, ...) â array Instance Public methods Return an array containing the values associated with the given keys. Also see Hash.select. h = { "cat" => "feline", "dog" => "canine", "cow" => "bovine" } h.values_at("cow", "cat") #=> ["bovine", "feline"]

default_proc=

hsh.default_proc = proc_obj or nil Instance Public methods Sets the default proc to be executed on each failed key lookup. h.default_proc = proc do |hash, key| hash[key] = key + key end h[2] #=> 4 h["cat"] #=> "catcat"

chown

chown(user, group, list, options = {}) Class Public methods Options: noop verbose Changes owner and group on the named files (in list) to the user user and the group group. user and group may be an ID (Integer/String) or a name (String). If user or group is nil, this method does not change the attribute. FileUtils.chown 'root', 'staff', '/usr/local/bin/ruby' FileUtils.chown nil, 'bin', Dir.glob('/usr/bin/*'), :verbose => true

ole_type

WIN32OLE_TYPE#ole_type #=> OLE type string. Instance Public methods returns type of OLE class. tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'Application') puts tobj.ole_type # => Class

accept_rule

accept_rule(rule) Instance Public methods Adds rule to the output