Raised when the tree is malformed or there is a bug in the compiler.
Add separator in summary.
Returns the parameter information of this proc. If the lambda keyword is provided and not nil, treats the proc as a lambda if true and as a non-lambda if false.
prc = proc{|x, y=42, *other|} prc.parameters #=> [[:opt, :x], [:opt, :y], [:rest, :other]] prc = lambda{|x, y=42, *other|} prc.parameters #=> [[:req, :x], [:opt, :y], [:rest, :other]] prc = proc{|x, y=42, *other|} prc.parameters(lambda: true) #=> [[:req, :x], [:opt, :y], [:rest, :other]] prc = lambda{|x, y=42, *other|} prc.parameters(lambda: false) #=> [[:opt, :x], [:opt, :y], [:rest, :other]]
Returns the parameter information of this method.
def foo(bar); end method(:foo).parameters #=> [[:req, :bar]] def foo(bar, baz, bat, &blk); end method(:foo).parameters #=> [[:req, :bar], [:req, :baz], [:req, :bat], [:block, :blk]] def foo(bar, *args); end method(:foo).parameters #=> [[:req, :bar], [:rest, :args]] def foo(bar, baz, *args, &blk); end method(:foo).parameters #=> [[:req, :bar], [:req, :baz], [:rest, :args], [:block, :blk]]
Returns the parameter information of this method.
def foo(bar); end method(:foo).parameters #=> [[:req, :bar]] def foo(bar, baz, bat, &blk); end method(:foo).parameters #=> [[:req, :bar], [:req, :baz], [:req, :bat], [:block, :blk]] def foo(bar, *args); end method(:foo).parameters #=> [[:req, :bar], [:rest, :args]] def foo(bar, baz, *args, &blk); end method(:foo).parameters #=> [[:req, :bar], [:req, :baz], [:rest, :args], [:block, :blk]]
Returns the parameter definitions of the method or block that the current hook belongs to. The format is the same as for Method#parameters
.
def comment_targets
: () -> Array[Node | Location]
def comment_targets
: () -> Array[Node | Location]