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.



1618
1619
1620
# File 'lib/syntax_tree.rb', line 1618

def initialize(value)
  @value = value
end

Instance Attribute Details

#valueObject (readonly)

VarField

the identifier that represents the remaining positionals



1616
1617
1618
# File 'lib/syntax_tree.rb', line 1616

def value
  @value
end

Instance Method Details

#commentsObject



1622
1623
1624
# File 'lib/syntax_tree.rb', line 1622

def comments
  value.comments
end

#format(q) ⇒ Object



1626
1627
1628
1629
# File 'lib/syntax_tree.rb', line 1626

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