Results for: "OptionParser"

No documentation available

ReadTimeout, a subclass of Timeout::Error, is raised if a chunk of the response cannot be read within the read_timeout.

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.

No documentation available

A compiler is a visitor that returns the value of each node as it visits. This is as opposed to a visitor which will only walk the tree. This can be useful when you are trying to compile a tree into a different format.

For example, to build a representation of the tree as s-expressions, you could write:

class SExpressions < Prism::Compiler
  def visit_arguments_node(node) = [:arguments, super]
  def visit_call_node(node) = [:call, super]
  def visit_integer_node(node) = [:integer]
  def visit_program_node(node) = [:program, super]
end

Prism.parse("1 + 2").value.accept(SExpressions.new)
# => [:program, [[[:call, [[:integer], [:arguments, [[:integer]]]]]]]]
No documentation available

Represents the use of the ‘alias` keyword to alias a global variable.

alias $foo $bar
^^^^^^^^^^^^^^^

Represents a set of arguments to a method or a keyword.

return foo, bar, baz
       ^^^^^^^^^^^^^

Represents an array literal. This can be a regular array using brackets or a special array using % like %w or %i.

[1, 2, 3]
^^^^^^^^^

Represents block method arguments.

bar(&args)
^^^^^^^^^^

Represents a block local variable.

a { |; b| }
       ^

Represents assigning to a method call.

foo.bar, = 1
^^^^^^^

begin
rescue => foo.bar
          ^^^^^^^
end

for foo.bar in baz do end
    ^^^^^^^

Represents the use of a case statement for pattern matching.

case true
in false
end
^^^^^^^^^

Represents the use of a case statement.

case true
when false
end
^^^^^^^^^^

Represents the use of the ‘&&=` operator for assignment to a class variable.

@@target &&= value
^^^^^^^^^^^^^^^^^^

Represents the use of the ‘||=` operator for assignment to a class variable.

@@target ||= value
^^^^^^^^^^^^^^^^^^

Represents writing to a class variable.

@@foo = 1
^^^^^^^^^

Represents the use of the ‘&&=` operator for assignment to a constant.

Target &&= value
^^^^^^^^^^^^^^^^

Represents the use of the ‘||=` operator for assignment to a constant.

Target ||= value
^^^^^^^^^^^^^^^^

Represents referencing a constant.

Foo
^^^

Represents writing to a constant.

Foo = 1
^^^^^^^

Represents an ‘else` clause in a `case`, `if`, or `unless` statement.

if a then b else c end
            ^^^^^^^^^^

Represents an interpolated variable.

"foo #@bar"
     ^^^^^

Represents the use of the literal ‘false` keyword.

false
^^^^^

Represents the use of the ‘..` or `…` operators to create flip flops.

baz if foo .. bar
       ^^^^^^^^^^
Search took: 8ms  ·  Total Results: 5424