Class: ASTree::PrettyNode::ARGS

Inherits:
ASTree::PrettyNode show all
Defined in:
lib/astree/pretty_node/args.rb

Instance Attribute Summary

Attributes inherited from ASTree::PrettyNode

#node

Instance Method Summary collapse

Methods inherited from ASTree::PrettyNode

#element_value, #initialize, #stringify_element

Constructor Details

This class inherits a constructor from ASTree::PrettyNode

Instance Method Details

#label_name(index) ⇒ Object



2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# File 'lib/astree/pretty_node/args.rb', line 2

def label_name(index)
  case index
  when 0
    'pre_num'
  when 1
    'pre_init'
  when 2
    'opt'
  when 3
    'first_post'
  when 4
    'post_num'
  when 5
    'post_init'
  when 6
    'rest'
  when 7
    'kw'
  when 8
    'kwrest'
  when 9
    'block'
  end
end