Results for: "module_function"

Returns the truncated value (toward zero).

Rational(3).truncate      #=> 3
Rational(2, 3).truncate   #=> 0
Rational(-3, 2).truncate  #=> -1

  #    decimal      -  1  2  3 . 4  5  6
  #                   ^  ^  ^  ^   ^  ^
  #   precision      -3 -2 -1  0  +1 +2

'%f' % Rational('-123.456').truncate(+1)  #=>  "-123.400000"
'%f' % Rational('-123.456').truncate(-1)  #=>  "-120.000000"

Returns a string in asctime(3) format (but without “n0” at the end). This method is equivalent to strftime(‘%c’).

See also asctime(3) or ctime(3).

Returns a string in asctime(3) format (but without “n0” at the end). This method is equivalent to strftime(‘%c’).

See also asctime(3) or ctime(3).

Returns a canonical string representation of time.

Time.now.asctime   #=> "Wed Apr  9 08:56:03 2003"

Returns a canonical string representation of time.

Time.now.asctime   #=> "Wed Apr  9 08:56:03 2003"

Provides a mechanism for issuing low-level commands to control or query I/O devices. Arguments and results are platform dependent. If arg is a number, its value is passed directly. If it is a string, it is interpreted as a binary sequence of bytes. On Unix platforms, see ioctl(2) for details. Not implemented on all platforms.

Returns the last change time, using directory information, not the file itself.

See File.ctime.

Truncates the file to length bytes.

See File.truncate.

Requests a connection to be made on the given remote_sockaddr. Returns 0 if successful, otherwise an exception is raised.

Parameter

Example:

# Pull down Google's web page
require 'socket'
include Socket::Constants
socket = Socket.new( AF_INET, SOCK_STREAM, 0 )
sockaddr = Socket.pack_sockaddr_in( 80, 'www.google.com' )
socket.connect( sockaddr )
socket.write( "GET / HTTP/1.0\r\n\r\n" )
results = socket.read

Unix-based Exceptions

On unix-based systems the following system exceptions may be raised if the call to connect fails:

On unix-based systems if the address family of the calling socket is AF_UNIX the follow exceptions may be raised if the call to connect fails:

Windows Exceptions

On Windows systems the following system exceptions may be raised if the call to connect fails:

See

creates a socket connected to the address of self.

The optional argument opts is options represented by a hash. opts may have following options:

:timeout

specify the timeout in seconds.

If a block is given, it is called with the socket and the value of the block is returned. The socket is returned otherwise.

Addrinfo.tcp("www.ruby-lang.org", 80).connect {|s|
  s.print "GET / HTTP/1.0\r\nHost: www.ruby-lang.org\r\n\r\n"
  puts s.read
}

Connects udpsocket to host:port.

This makes possible to send without destination address.

u1 = UDPSocket.new
u1.bind("127.0.0.1", 4913)
u2 = UDPSocket.new
u2.connect("127.0.0.1", 4913)
u2.send "uuuu", 0
p u1.recvfrom(10) #=> ["uuuu", ["AF_INET", 33230, "localhost", "127.0.0.1"]]

Truncates the buffer string to at most integer bytes. The strio must be opened for writing.

Appends str to the string being scanned. This method does not affect scan pointer.

s = StringScanner.new("Fri Dec 12 1975 14:39")
s.scan(/Fri /)
s << " +1000 GMT"
s.string            # -> "Fri Dec 12 1975 14:39 +1000 GMT"
s.scan(/Dec/)       # -> "Dec"

Returns running OLE Automation object or WIN32OLE object from moniker. 1st argument should be OLE program id or class id or moniker.

WIN32OLE.connect('Excel.Application') # => WIN32OLE object which represents running Excel.

Returns the type library version.

tlib = WIN32OLE_TYPELIB.new('Microsoft Excel 9.0 Object Library')
puts tlib.version #-> "1.3"

Returns revision information for the erb.rb module.

Version

Version

As int is already an Integer, all these methods simply return the receiver.

Synonyms are to_int, floor, ceil, truncate.

No documentation available

bn.mod_mul(bn1, bn2) -> aBN

schedule a command

This method injects an instance variable unconverted_fields into row and an accessor method for row called unconverted_fields(). The variable is set to the contents of fields.

No documentation available
No documentation available
Search took: 36ms  ·  Total Results: 3558