This is a Ruby tree! It shows every object from the Ruby Programming Language in a tree format.

arity

        # Proc.arity

(from ruby core)
---
    prc.arity -> integer

---

Returns the number of mandatory arguments. If the block is declared to
take no arguments, returns 0. If the block is known to take exactly n
arguments, returns n. If the block has optional arguments, returns -n-1,
where n is the number of mandatory arguments, with the exception for
blocks that are not lambdas and have only a finite number of optional
arguments; in this latter case, returns n. Keyword arguments will be
considered as a single additional argument, that argument being
mandatory if any keyword argument is mandatory. A #proc with no argument
declarations is the same as a block declaring `||` as its arguments.

    proc {}.arity                  #=>  0
    proc { || }.arity              #=>  0
    proc { |a| }.arity             #=>  1
    proc { |a, b| }.arity          #=>  2
    proc { |a, b, c| }.arity       #=>  3
    proc { |*a| }.arity            #=> -1
    proc { |a, *b| }.arity         #=> -2
    proc { |a, *b, c| }.arity      #=> -3
    proc { |x:, y:, z:0| }.arity   #=>  1
    proc { |*a, x:, y:0| }.arity   #=> -2

    proc   { |a=0| }.arity         #=>  0
    lambda { |a=0| }.arity         #=> -1
    proc   { |a=0, b| }.arity      #=>  1
    lambda { |a=0, b| }.arity      #=> -2
    proc   { |a=0, b=0| }.arity    #=>  0
    lambda { |a=0, b=0| }.arity    #=> -1
    proc   { |a, b=0| }.arity      #=>  1
    lambda { |a, b=0| }.arity      #=> -2
    proc   { |(a, b), c=0| }.arity #=>  1
    lambda { |(a, b), c=0| }.arity #=> -2
    proc   { |a, x:0, y:0| }.arity #=>  1
    lambda { |a, x:0, y:0| }.arity #=> -2



      

This is MURDOC! A Ruby documentation browser inspired by Smalltalk-80. It allows you to learn about Ruby by browsing through its class hierarchies, and see any of its methods.