Results for: "minmax"

Map from option/keyword string to object with completion.

Raises when a switch with mandatory argument has no argument.

PrettyPrint::SingleLine is used by PrettyPrint.singleline_format

It is passed to be similar to a PrettyPrint object itself, by responding to:

but instead, the output has no line breaks

Represents an imaginary number literal.

1.0i
^^^^

Represents a string literal that contains interpolation.

"foo #{bar} baz"
^^^^^^^^^^^^^^^^

Represents an xstring literal that contains interpolation.

`foo #{bar} baz`
^^^^^^^^^^^^^^^^

Represents a regular expression literal used in the predicate of a conditional to implicitly match against the last line read by an IO object.

if /foo/i then end
   ^^^^^^

Represents a node that is missing from the source and results in a syntax error.

InlineComment objects are the most common. They correspond to comments in the source file like this one that start with #.

The command manager registers and installs all the individual sub-commands supported by the gem command.

Extra commands can be provided by writing a rubygems_plugin.rb file in an installed gem. You should register your command against the Gem::CommandManager instance, like this:

# file rubygems_plugin.rb
require 'rubygems/command_manager'

Gem::CommandManager.instance.register_command :edit

You should put the implementation of your command in rubygems/commands.

# file rubygems/commands/edit_command.rb
class Gem::Commands::EditCommand < Gem::Command
  # ...
end

See Gem::Command for instructions on writing gem commands.

Raised when trying to activate a gem, and that gem does not exist on the system. Instead of rescuing from this class, make sure to rescue from the superclass Gem::LoadError to catch all types of load errors.

Raised when trying to activate a gem, and the gem exists on the system, but not the requested version. Instead of rescuing from this class, make sure to rescue from the superclass Gem::LoadError to catch all types of load errors.

Generated when trying to lookup a gem to indicate that the gem was found, but that it isn’t usable on the current platform.

fetch and install read these and report them to the user to aid in figuring out why a gem couldn’t be installed.

No documentation available

Explains syntax errors based on their source

example:

source = "def foo; puts 'lol'" # Note missing end
explain ExplainSyntax.new(
  code_lines: CodeLine.from_source(source)
).call
explain.errors.first
# => "Unmatched keyword, missing `end' ?"

When the error cannot be determined by lexical counting then the parser is run against the input and the raw errors are returned.

Example:

source = "1 * " # Note missing a second number
explain ExplainSyntax.new(
  code_lines: CodeLine.from_source(source)
).call
explain.errors.first
# => "syntax error, unexpected end-of-input"

Raised when a mathematical function is evaluated outside of its domain of definition.

For example, since cos returns values in the range -1..1, its inverse function acos is only defined on that interval:

Math.acos(42)

produces:

Math::DomainError: Numerical argument is out of domain - "acos"
No documentation available

Flags for interpolated string nodes that indicated mutability if they are also marked as literals.

No documentation available

Helper methods for both Gem::Installer and Gem::Uninstaller

An error class raised when missing nodes are found while computing a constant path’s full name. For example:

Foo

-> raises because the constant path is missing the last part

Shows the context around code provided by “falling” indentation

If this is the original code lines:

class OH
  def hello
    it "foo" do
  end
end

And this is the line that is captured

it "foo" do

It will yield its surrounding context:

class OH
  def hello
  end
end

Example:

FallingIndentLines.new(
    block: block,
    code_lines: @code_lines
).call do |line|
  @lines_to_output << line
end

Enumerator::Chain is a subclass of Enumerator, which represents a chain of enumerables that works as a single enumerator.

This type of objects can be created by Enumerable#chain and Enumerator#+.

No documentation available

Fiddle::Pointer is a class to handle C pointers

Search took: 4ms  ·  Total Results: 2365