Results for: "module_function"

No documentation available

URL-decode a string with encoding(optional).

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

Unescape a string that has been HTML-escaped

CGI.unescapeHTML("Usage: foo "bar" <baz>")
   # => "Usage: foo \"bar\" <baz>"
No documentation available

Returns “true” if the “transfer-encoding” header is present and set to “chunked”. This is an HTTP/1.1 feature, allowing the content to be sent in “chunks” without at the outset stating the entire content length.

No documentation available
No documentation available

Handles a doctype declaration. Any attributes of the doctype which are not supplied will be nil. # EG, <!DOCTYPE me PUBLIC “foo” “bar”> @p name the name of the doctype; EG, “me” @p pub_sys “PUBLIC”, “SYSTEM”, or nil. EG, “PUBLIC” @p long_name the supplied long name, or nil. EG, “foo” @p uri the uri of the doctype, or nil. EG, “bar”

<!ENTITY …> The argument passed to this method is an array of the entity declaration. It can be in a number of formats, but in general it returns (example, result):

<!ENTITY % YN '"Yes"'>
["%", "YN", "\"Yes\""]
<!ENTITY % YN 'Yes'>
["%", "YN", "Yes"]
<!ENTITY WhatHeSaid "He said %YN;">
["WhatHeSaid", "He said %YN;"]
<!ENTITY open-hatch SYSTEM "http://www.textuality.com/boilerplate/OpenHatch.xml">
["open-hatch", "SYSTEM", "http://www.textuality.com/boilerplate/OpenHatch.xml"]
<!ENTITY open-hatch PUBLIC "-//Textuality//TEXT Standard open-hatch boilerplate//EN" "http://www.textuality.com/boilerplate/OpenHatch.xml">
“open-hatch”, “PUBLIC”, “-//Textuality//TEXT Standard open-hatch boilerplate//EN”, “www.textuality.com/boilerplate/OpenHatch.xml

<!ENTITY hatch-pic SYSTEM “../grafix/OpenHatch.gif” NDATA gif>

“hatch-pic”, “SYSTEM”, “../grafix/OpenHatch.gif”, “NDATA”, “gif”

Handles a doctype declaration. Any attributes of the doctype which are not supplied will be nil. # EG, <!DOCTYPE me PUBLIC “foo” “bar”> @p name the name of the doctype; EG, “me” @p pub_sys “PUBLIC”, “SYSTEM”, or nil. EG, “PUBLIC” @p long_name the supplied long name, or nil. EG, “foo” @p uri the uri of the doctype, or nil. EG, “bar”

<!ENTITY …> The argument passed to this method is an array of the entity declaration. It can be in a number of formats, but in general it returns (example, result):

<!ENTITY % YN '"Yes"'>
["YN", "\"Yes\"", "%"]
<!ENTITY % YN 'Yes'>
["YN", "Yes", "%"]
<!ENTITY WhatHeSaid "He said %YN;">
["WhatHeSaid", "He said %YN;"]
<!ENTITY open-hatch SYSTEM "http://www.textuality.com/boilerplate/OpenHatch.xml">
["open-hatch", "SYSTEM", "http://www.textuality.com/boilerplate/OpenHatch.xml"]
<!ENTITY open-hatch PUBLIC "-//Textuality//TEXT Standard open-hatch boilerplate//EN" "http://www.textuality.com/boilerplate/OpenHatch.xml">
["open-hatch", "PUBLIC", "-//Textuality//TEXT Standard open-hatch boilerplate//EN", "http://www.textuality.com/boilerplate/OpenHatch.xml"]
<!ENTITY hatch-pic SYSTEM "../grafix/OpenHatch.gif" NDATA gif>
["hatch-pic", "SYSTEM", "../grafix/OpenHatch.gif", "gif"]

Called when %foo; is encountered in a doctype declaration. @p content “foo”

Zlib::GzipReader wrapper that unzips data.

Synopsis

URI.unescape(str)

Args

str

String to unescape.

Description

This method is obsolete and should not be used. Instead, use CGI.unescape, URI.decode_www_form or URI.decode_www_form_component depending on your specific use case.

Usage

require 'uri'

enc_uri = URI.escape("http://example.com/?a=\11\15")
# => "http://example.com/?a=%09%0D"

URI.unescape(enc_uri)
# => "http://example.com/?a=\t\r"

Is code a redirection status?

Is code a redirection status?

Unescapes HTTP reserved and unwise characters in str

Executes the passed block and raises exception if execution takes more than seconds.

If seconds is zero or nil, simply executes the block

Executes the passed block and raises exception if execution takes more than seconds.

If seconds is zero or nil, simply executes the block

(see Gem::Resolver::Molinillo::ResolutionState#activated)

(see Gem::Resolver::Molinillo::ResolutionState#conflicts)

Deletes the element at the specified index, returning that element, or nil if the index is out of range.

See also Array#slice!

a = ["ant", "bat", "cat", "dog"]
a.delete_at(2)    #=> "cat"
a                 #=> ["ant", "bat", "dog"]
a.delete_at(99)   #=> nil

Deletes every element of self for which block evaluates to true.

The array is changed instantly every time the block is called, not after the iteration is over.

See also Array#reject!

If no block is given, an Enumerator is returned instead.

scores = [ 97, 42, 75 ]
scores.delete_if {|score| score < 80 }   #=> [97]

Passes elements to the block until the block returns nil or false, then stops iterating and returns an array of all prior elements.

If no block is given, an Enumerator is returned instead.

See also Array#drop_while

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

Drops elements up to, but not including, the first element for which the block returns nil or false and returns an array containing the remaining elements.

If no block is given, an Enumerator is returned instead.

See also Array#take_while

a = [1, 2, 3, 4, 5, 0]
a.drop_while {|i| i < 3 }   #=> [3, 4, 5, 0]
Search took: 10ms  ·  Total Results: 3881