Class: SyntaxTree::AryPtn::RestFormatter

Inherits:
Object
  • Object
show all
Defined in:
lib/syntax_tree/node.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(value) ⇒ RestFormatter

Returns a new instance of RestFormatter.



1165
1166
1167
# File 'lib/syntax_tree/node.rb', line 1165

def initialize(value)
  @value = value
end

Instance Attribute Details

#valueObject (readonly)

VarField

the identifier that represents the remaining positionals



1163
1164
1165
# File 'lib/syntax_tree/node.rb', line 1163

def value
  @value
end

Instance Method Details

#commentsObject



1169
1170
1171
# File 'lib/syntax_tree/node.rb', line 1169

def comments
  value.comments
end

#format(q) ⇒ Object



1173
1174
1175
1176
# File 'lib/syntax_tree/node.rb', line 1173

def format(q)
  q.text("*")
  q.format(value)
end