Class: SyntaxTree::AryPtn::RestFormatter
- Inherits:
-
Object
- Object
- SyntaxTree::AryPtn::RestFormatter
- Defined in:
- lib/syntax_tree/node.rb
Instance Attribute Summary collapse
-
#value ⇒ Object
readonly
- VarField
-
the identifier that represents the remaining positionals.
Instance Method Summary collapse
- #comments ⇒ Object
- #format(q) ⇒ Object
-
#initialize(value) ⇒ RestFormatter
constructor
A new instance of RestFormatter.
Constructor Details
#initialize(value) ⇒ RestFormatter
Returns a new instance of RestFormatter.
931 932 933 |
# File 'lib/syntax_tree/node.rb', line 931 def initialize(value) @value = value end |
Instance Attribute Details
#value ⇒ Object (readonly)
- VarField
-
the identifier that represents the remaining positionals
929 930 931 |
# File 'lib/syntax_tree/node.rb', line 929 def value @value end |
Instance Method Details
#comments ⇒ Object
935 936 937 |
# File 'lib/syntax_tree/node.rb', line 935 def comments value.comments end |
#format(q) ⇒ Object
939 940 941 942 |
# File 'lib/syntax_tree/node.rb', line 939 def format(q) q.text("*") q.format(value) end |