WriteTimeout
, a subclass of Timeout::Error
, is raised if a chunk of the response cannot be written within the write_timeout. Not raised on Windows.
Raised on redirection, only occurs when redirect
option for HTTP is false
.
Indicates a timeout resolving a name or address.
Documentation?
A NotifyTemplateEntry
is returned by TupleSpace#notify
and is notified of TupleSpace
changes. You may receive either your subscribed event or the ‘close’ event when iterating over notifications.
See TupleSpace#notify_event
for valid notification types.
ts = Rinda::TupleSpace.new observer = ts.notify 'write', [nil] Thread.start do observer.each { |t| p t } end 3.times { |i| ts.write [i] }
Outputs:
['write', [0]] ['write', [1]] ['write', [2]]
The Dependency
class holds a Gem
name and a Gem::Requirement
.
Gem::DependencyList
is used for installing and uninstalling gems in the correct order to avoid conflicts.
Cleans up after a partially-failed uninstall or for an invalid Gem::Specification
.
If a specification was removed by hand this will remove any remaining files.
If a corrupt specification was installed this will clean up warnings by removing the bogus specification.
Run an instance of the gem program.
Gem::GemRunner
is only intended for internal use by RubyGems itself. It does not form any public API and may change at any time for any reason.
If you would like to duplicate functionality of ‘gem` commands, use the classes they call directly.
This class is useful for exploring contents before and after a block
It searches above and below the passed in block to match for whatever criteria you give it:
Example:
def dog # 1 puts "bark" # 2 puts "bark" # 3 end # 4 scan = AroundBlockScan.new( code_lines: code_lines block: CodeBlock.new(lines: code_lines[1]) ) scan.scan_while { true } puts scan.before_index # => 0 puts scan.after_index # => 3
Contents can also be filtered using AroundBlockScan#skip
To grab the next surrounding indentation use AroundBlockScan#scan_adjacent_indent
Acts like a StringIO
with reduced API, but without having to require that class.
Holds elements in a priority heap on insert
Instead of constantly calling ‘sort!`, put the element where it belongs the first time around
Example:
queue = PriorityQueue.new queue << 33 queue << 44 queue << 1 puts queue.peek # => 44
Tracks which lines various code blocks have expanded to and which are still unexplored
Not a URI
component.
Raised by Encoding
and String
methods when the string being transcoded contains a byte invalid for the either the source or target encoding.
Encoding
conversion class.
AbstractSyntaxTree
provides methods to parse Ruby code into abstract syntax trees. The nodes in the tree are instances of RubyVM::AbstractSyntaxTree::Node
.
This module is MRI specific as it exposes implementation details of the MRI abstract syntax tree.
This module is experimental and its API is not stable, therefore it might change without notice. As examples, the order of children nodes is not guaranteed, the number of children nodes might change, there is no way to access children nodes by name, etc.
If you are looking for a stable API or an API working under multiple Ruby implementations, consider using the parser gem or Ripper
. If you would like to make RubyVM::AbstractSyntaxTree
stable, please join the discussion at bugs.ruby-lang.org/issues/14844.
File::Constants
provides file-related constants. All possible file constants are listed in the documentation but they may not all be present on your platform.
If the underlying platform doesn’t define a constant the corresponding Ruby constant is not defined.
Your platform documentations (e.g. man open(2)) may describe more detailed information.