Class: SyntaxTree::AryPtn::RestFormatter

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(value) ⇒ RestFormatter

Returns a new instance of RestFormatter.



1505
1506
1507
# File 'lib/syntax_tree.rb', line 1505

def initialize(value)
  @value = value
end

Instance Attribute Details

#valueObject (readonly)

VarField

the identifier that represents the remaining positionals



1503
1504
1505
# File 'lib/syntax_tree.rb', line 1503

def value
  @value
end

Instance Method Details

#commentsObject



1509
1510
1511
# File 'lib/syntax_tree.rb', line 1509

def comments
  value.comments
end

#format(q) ⇒ Object



1513
1514
1515
1516
# File 'lib/syntax_tree.rb', line 1513

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