Results for: "module_function"

Returns true if key is a key in self, otherwise false.

No documentation available

Returns a new String containing informations about the map:

m = ObjectSpace::WeakKeyMap.new
m[key] = value
m.inspect # => "#<ObjectSpace::WeakKeyMap:0x00000001028dcba8 size=1>"

Returns HTML-unescaped string.

Returns URL-escaped string following RFC 3986.

Returns URL-unescaped string (application/x-www-form-urlencoded).

URL-decode an application/x-www-form-urlencoded string with encoding(optional).

string = CGI.unescape("%27Stop%21%27+said+Fred")
   # => "'Stop!' said Fred"

URL-encode a string following RFC 3986 Space characters (+“ ”+) are encoded with (+“%20”+)

url_encoded_string = CGI.escapeURIComponent("'Stop!' said Fred")
   # => "%27Stop%21%27%20said%20Fred"

Unescape a string that has been HTML-escaped

CGI.unescapeHTML("Usage: foo &quot;bar&quot; &lt;baz&gt;")
   # => "Usage: foo \"bar\" <baz>"

Creates a printable version of the digest object.

Reads at most maxlen bytes from the stream. If buf is provided it must reference a string which will receive the data.

See IO#readpartial for full details.

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).

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

Returns true if field 'Transfer-Encoding' exists and has value 'chunked', false otherwise; see Transfer-Encoding response header:

res = Net::HTTP.get_response(hostname, '/todos/1')
res['Transfer-Encoding'] # => "chunked"
res.chunked?             # => true

Zlib::GzipReader wrapper that unzips data.

Raises a TypeError to prevent cloning.

No documentation available
No documentation available
No documentation available

Removes the element of self at the given index, which must be an integer-convertible object.

When index is non-negative, deletes the element at offset index:

a = [:foo, 'bar', 2]
a.delete_at(1) # => "bar"
a # => [:foo, 2]

When index is negative, counts backward from the end of the array:

a = [:foo, 'bar', 2]
a.delete_at(-2) # => "bar"
a # => [:foo, 2]

When index is out of range, returns nil.

a = [:foo, 'bar', 2]
a.delete_at(3)  # => nil
a.delete_at(-4) # => nil

Related: see Methods for Deleting.

With a block given, calls the block with each element of self; removes the element if the block returns a truthy value; returns self:

a = [:foo, 'bar', 2, 'bat']
a.delete_if {|element| element.to_s.start_with?('b') } # => [:foo, 2]

With no block given, returns a new Enumerator.

Related: see Methods for Deleting.

With a block given, calls the block with each successive element of self; stops iterating if the block returns false or nil; returns a new array containing those elements for which the block returned a truthy value:

a = [0, 1, 2, 3, 4, 5]
a.take_while {|element| element < 3 } # => [0, 1, 2]
a.take_while {|element| true }        # => [0, 1, 2, 3, 4, 5]
a.take_while {|element| false }       # => []

With no block given, returns a new Enumerator.

Does not modify self.

Related: see Methods for Fetching.

Search took: 5ms  ·  Total Results: 3346