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 OLE variable name and the value with class name.
Return the contents of this hash as a string.
h = { "c" => 300, "a" => 100, "d" => 400, "c" => 300 } h.to_s #=> "{\"c\"=>300, \"a\"=>100, \"d\"=>400}"
Returns a new hash with the nil values/key pairs removed
h = { a: 1, b: false, c: nil } h.compact #=> { a: 1, b: false } h #=> { a: 1, b: false, c: nil }
Removes all nil values from the hash. Returns the hash.
h = { a: 1, b: false, c: nil } h.compact! #=> { a: 1, b: false }
Returns the contents of the environment as a String.
This is a deprecated alias for each_codepoint
.
Returns “ARGF”.
Returns a Hash
containing implementation-dependent counters inside the VM.
This hash includes information about method/constant cache serials:
{ :global_method_state=>251, :global_constant_state=>481, :class_serial=>9029 }
The contents of the hash are implementation specific and may be changed in the future.
This method is only expected to work on C Ruby.
Synonym for $stdin.
Synonym for $stdout.
Returns a simplified description of the key CSV
attributes in an ASCII compatible String.
Start tracing
Tracer.on # code to trace here Tracer.off
You can also pass a block:
Tracer.on { # trace everything in this block }
Returns the IO
used as stdout. Defaults to STDOUT
Sets the IO
used as stdout. Defaults to STDOUT
Trust both the object returned by _getobj_ and self.
Untrust both the object returned by _getobj_ and self.
Returns a network byte ordered string form of the IP address.
Returns a string containing a human-readable representation of the ipaddr. (“#<IPAddr: family:address/mask>”)
Creates a matrix where the diagonal elements are composed of values
.
Matrix.diagonal(9, 5, -3) => 9 0 0 0 5 0 0 0 -3
Create a matrix by stacking matrices vertically
x = Matrix[[1, 2], [3, 4]] y = Matrix[[5, 6], [7, 8]] Matrix.vstack(x, y) # => Matrix[[1, 2], [3, 4], [5, 6], [7, 8]]
Create a matrix by stacking matrices horizontally
x = Matrix[[1, 2], [3, 4]] y = Matrix[[5, 6], [7, 8]] Matrix.hstack(x, y) # => Matrix[[1, 2, 5, 6], [3, 4, 7, 8]]
Returns column vector number j
of the matrix as a Vector
(starting at 0 like an array). When a block is given, the elements of that vector are iterated.
Returns a matrix that is the result of iteration of the given block over all elements of the matrix.
Matrix[ [1,2], [3,4] ].collect { |e| e**2 } => 1 4 9 16