cycle

cycle(first_value, *values) Instance Public methods Creates a Cycle object whose to_s method cycles through elements of an array every time it is called. This can be used for example, to alternate classes for table rows. You can use named cycles to allow nesting in loops. Passing a Hash as the last parameter with a :name key will create a named cycle. The default name for a cycle without a :name key is "default". You can manually reset a cycle by calling #reset_cycle and passing th

sum

str.sum(n=16) â integer Instance Public methods Returns a basic n-bit checksum of the characters in str, where n is the optional Fixnum parameter, defaulting to 16. The result is simply the sum of the binary value of each character in str modulo 2**n - 1. This is not a particularly good checksum.

rest_size

rest_size() Instance Public methods s.rest_size is equivalent to s.rest.size.

session_store

session_store(*args) Instance Public methods

full_name

full_name() Instance Public methods

parse_source

parse_source(source, listener) Class Public methods

sysread

ios.sysread(maxlen[, outbuf]) â string Instance Public methods Reads maxlen bytes from ios using a low-level read and returns them as a string. Do not mix with other methods that read from ios or you may get unpredictable results. If the optional outbuf argument is present, it must reference a String, which will receive the data. The outbuf will contain only the received data after the method call even if it is not empty at the beginning. Raises SystemCallError on error and EO

call

call(env) Instance Public methods Since the IP address may not be needed, we store the object here without calculating the IP to keep from slowing down the majority of requests. For those requests that do need to know the IP, the ActionDispatch::RemoteIp::GetIp#calculate_ip method will calculate the memoized client IP address.

floor

floor(n) Instance Public methods Return the largest integer less than or equal to the value, as a BigDecimal. BigDecimal('3.14159').floor #=> 3 BigDecimal('-9.1').floor #=> -10 If n is specified and positive, the fractional part of the result has no more than that many digits. If n is specified and negative, at least that many digits to the left of the decimal point will be 0 in the result. BigDecimal('3.14159').floor(3) #=> 3.141 BigDecimal('13345.234').floor(-2) #=>

getnames 2

getnames(address) Instance Public methods Looks up all hostnames for address.