Results for: "to_proc"

Returns an array of syntax error messages

If no missing pairs are found it falls back on the original ripper error messages

Invoked by methods like Thread.join, and by Mutex, to signify that current Fiber is blocked until further notice (e.g. unblock) or until timeout has elapsed.

blocker is what we are waiting on, informational only (for debugging and logging). There are no guarantee about its value.

Expected to return boolean, specifying whether the blocking operation was successful or not.

Invoked to wake up Fiber previously blocked with block (for example, Mutex#lock calls block and Mutex#unlock calls unblock). The scheduler should use the fiber parameter to understand which fiber is unblocked.

blocker is what was awaited for, but it is informational only (for debugging and logging), and it is not guaranteed to be the same value as the blocker for block.

Returns true if this lock is currently held by some thread.

Attempts to grab the lock and waits if it isn’t available. Raises ThreadError if mutex was locked by the current thread.

Releases the lock. Raises ThreadError if mutex wasn’t locked by the current thread.

Obtains a lock, runs the block, and releases the lock when the block completes. See the example under Thread::Mutex.

Wakes up all threads waiting for this lock.

Prettify (indent) an HTML string.

string is the HTML string to indent. shift is the indentation unit to use; it defaults to two spaces.

print CGI.pretty("<HTML><BODY></BODY></HTML>")
  # <HTML>
  #   <BODY>
  #   </BODY>
  # </HTML>

print CGI.pretty("<HTML><BODY></BODY></HTML>", "\t")
  # <HTML>
  #         <BODY>
  #         </BODY>
  # </HTML>

Writes args to the stream.

See IO#print for full details.

Formats and writes to the stream converting parameters under control of the format string.

See Kernel#sprintf for format string details.

See IO#print.

See IO#printf.

Generate a BlockQuote element as a string.

cite can either be a string, give the URI for the source of the quoted text, or a hash, giving all attributes of the element, or it can be omitted, in which case the element has no attributes.

The body is provided by the passed-in no-argument block

blockquote("http://www.example.com/quotes/foo.html") { "Foo!" }
  #=> "<BLOCKQUOTE CITE=\"http://www.example.com/quotes/foo.html\">Foo!</BLOCKQUOTE>
No documentation available
No documentation available

Simple deprecation method that deprecates name by wrapping it up in a dummy method. It warns on each call to the dummy method telling the user of repl (unless repl is :none) and the year/month that it is planned to go away.

Is local fetching enabled?

No documentation available

Called roughly every {#progress_rate}, this method should convey progress to the user.

@return [void]

How often progress should be conveyed to the user via {#indicate_progress}, in seconds. A third of a second, by default.

@return [Float]

Parses the most indented lines into blocks that are marked and added to the frontier

Returns a new Array containing zero or more trailing elements of self; does not modify self.

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

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

With no block given, returns a new Enumerator:

[0, 1].drop_while # => # => #<Enumerator: [0, 1]:drop_while>

Returns a copy of self with leading substring prefix removed:

'hello'.delete_prefix('hel')      # => "lo"
'hello'.delete_prefix('llo')      # => "hello"
'тест'.delete_prefix('те')        # => "ст"
'こんにちは'.delete_prefix('こん')  # => "にちは"

Related: String#delete_prefix!, String#delete_suffix.

Like String#delete_prefix, except that self is modified in place. Returns self if the prefix is removed, nil otherwise.

Search took: 4ms  ·  Total Results: 1731