Class: LibRubyParser::Nodes::Numblock

Inherits:
LibRubyParser::Node show all
Defined in:
lib/lib-ruby-parser/nodes.rb

Overview

Represents a block that takes numbered parameters (i.e. proc { _1 })

Instance Attribute Summary collapse

Instance Attribute Details

#begin_lLoc (readonly)

Location of the open brace

proc { _1 }
     ~

Returns:



3026
3027
3028
# File 'lib/lib-ruby-parser/nodes.rb', line 3026

def begin_l
  @begin_l
end

#bodyNode (readonly)

Block body

Returns:



3017
3018
3019
# File 'lib/lib-ruby-parser/nodes.rb', line 3017

def body
  @body
end

#callNode (readonly)

Method call that takes a block

Returns:



3009
3010
3011
# File 'lib/lib-ruby-parser/nodes.rb', line 3009

def call
  @call
end

#end_lLoc (readonly)

Location of the closing brace

proc { _1 }
          ~

Returns:



3035
3036
3037
# File 'lib/lib-ruby-parser/nodes.rb', line 3035

def end_l
  @end_l
end

#expression_lLoc (readonly)

Location of the open brace

proc { _1 }
~~~~~~~~~~~

Returns:



3044
3045
3046
# File 'lib/lib-ruby-parser/nodes.rb', line 3044

def expression_l
  @expression_l
end

#numargsInteger (readonly)

Number of parameters that block takes

Returns:

  • (Integer)


3013
3014
3015
# File 'lib/lib-ruby-parser/nodes.rb', line 3013

def numargs
  @numargs
end