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.
7822 7823 7824 |
# File 'lib/syntax_tree/node.rb', line 7822 def initialize(value) @value = value end |
Instance Attribute Details
#value ⇒ Object (readonly)
[:nil | ArgsForward | KwRestParam] the value of the parameter
7820 7821 7822 |
# File 'lib/syntax_tree/node.rb', line 7820 def value @value end |
Instance Method Details
#comments ⇒ Object
7826 7827 7828 |
# File 'lib/syntax_tree/node.rb', line 7826 def comments [] end |
#format(q) ⇒ Object
7830 7831 7832 7833 7834 7835 7836 |
# File 'lib/syntax_tree/node.rb', line 7830 def format(q) if value == :nil q.text("**nil") else q.format(value) end end |