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.



1605
1606
1607
# File 'lib/syntax_tree.rb', line 1605

def initialize(value)
  @value = value
end

Instance Attribute Details

#valueObject (readonly)

VarField

the identifier that represents the remaining positionals



1603
1604
1605
# File 'lib/syntax_tree.rb', line 1603

def value
  @value
end

Instance Method Details

#commentsObject



1609
1610
1611
# File 'lib/syntax_tree.rb', line 1609

def comments
  value.comments
end

#format(q) ⇒ Object



1613
1614
1615
1616
# File 'lib/syntax_tree.rb', line 1613

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