Results for: "String#[]"

Creates a global method from the given C signature using the given opts as bind parameters with the given block.

Reads a line as with IO#gets, but raises EOFError if already at end-of-file; see Line IO.

Reads lines from the stream which are separated by eol.

See also gets

Reads a line from the stream which is separated by eol.

Raises EOFError if at end of file.

Pushes character c back onto the stream such that a subsequent buffered character read will return it.

Unlike IO#getc multiple bytes may be pushed back onto the stream.

Has no effect on unbuffered reads (such as sysread).

Writes s to the stream. If the argument is not a String it will be converted using .to_s method. Returns the number of bytes written.

No documentation available

If a block is given, it prints out each of the elements encountered. Block parameters are (in that order):

Example

der = File.binread('asn1data.der')
OpenSSL::ASN1.traverse(der) do | depth, offset, header_len, length, constructed, tag_class, tag|
  puts "Depth: #{depth} Offset: #{offset} Length: #{length}"
  puts "Header length: #{header_len} Tag: #{tag} Tag class: #{tag_class} Constructed: #{constructed}"
end

Return true if the PRNG has been seeded with enough data, false otherwise.

Start streaming using encoding

No documentation available
No documentation available
No documentation available
No documentation available
No documentation available
No documentation available

Returns an array of Range objects that represent the value of field 'Range', or nil if there is no such field; see Range request header:

req = Net::HTTP::Get.new(uri)
req['Range'] = 'bytes=0-99,200-299,400-499'
req.range # => [0..99, 200..299, 400..499]
req.delete('Range')
req.range # # => nil
No documentation available

Adds a separated list. The list is separated by comma with breakable space, by default.

seplist iterates the list using iter_method. It yields each object to the block given for seplist. The procedure separator_proc is called between each yields.

If the iteration is zero times, separator_proc is not called at all.

If separator_proc is nil or not given, +lambda { comma_breakable }+ is used. If iter_method is not given, :each is used.

For example, following 3 code fragments has similar effect.

q.seplist([1,2,3]) {|v| xxx v }

q.seplist([1,2,3], lambda { q.comma_breakable }, :each) {|v| xxx v }

xxx 1
q.comma_breakable
xxx 2
q.comma_breakable
xxx 3

Generate a random alphanumeric string.

The argument n specifies the length, in characters, of the alphanumeric string to be generated.

If n is not specified or is nil, 16 is assumed. It may be larger in the future.

The result may contain A-Z, a-z and 0-9.

require 'random/formatter'

Random.alphanumeric     #=> "2BuBuLf3WfSKyQbR"
# or
prng = Random.new
prng.alphanumeric(10) #=> "i6K93NdqiH"

Writes pemmable, which must respond to to_pem to path with the given permissions. If passed cipher and passphrase those arguments will be passed to to_pem.

The host to connect to either from the RUBYGEMS_HOST environment variable or from the user’s configuration

A Zlib::Inflate#inflate wrapper

Returns the (real) user ID of this process.

Process.uid   #=> 501

Returns the (real) group ID for this process.

Process.gid   #=> 500
Search took: 5ms  ·  Total Results: 2816