Class: SyntaxTree::Params::KeywordRestFormatter
- Inherits:
-
Object
- Object
- SyntaxTree::Params::KeywordRestFormatter
- Defined in:
- lib/syntax_tree/node.rb
Instance Attribute Summary collapse
-
#value ⇒ Object
readonly
- :nil | ArgsForward | KwRestParam
-
the value of the parameter.
Instance Method Summary collapse
- #comments ⇒ Object
- #format(q) ⇒ Object
-
#initialize(value) ⇒ KeywordRestFormatter
constructor
A new instance of KeywordRestFormatter.
Constructor Details
#initialize(value) ⇒ KeywordRestFormatter
Returns a new instance of KeywordRestFormatter.
6562 6563 6564 |
# File 'lib/syntax_tree/node.rb', line 6562 def initialize(value) @value = value end |
Instance Attribute Details
#value ⇒ Object (readonly)
- :nil | ArgsForward | KwRestParam
-
the value of the parameter
6560 6561 6562 |
# File 'lib/syntax_tree/node.rb', line 6560 def value @value end |
Instance Method Details
#comments ⇒ Object
6566 6567 6568 |
# File 'lib/syntax_tree/node.rb', line 6566 def comments [] end |
#format(q) ⇒ Object
6570 6571 6572 6573 6574 6575 6576 |
# File 'lib/syntax_tree/node.rb', line 6570 def format(q) if value == :nil q.text("**nil") else q.format(value) end end |