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.
6020 6021 6022 |
# File 'lib/syntax_tree/node.rb', line 6020 def initialize(value) @value = value end |
Instance Attribute Details
#value ⇒ Object (readonly)
[:nil | ArgsForward | KwRestParam] the value of the parameter
6018 6019 6020 |
# File 'lib/syntax_tree/node.rb', line 6018 def value @value end |
Instance Method Details
#comments ⇒ Object
6024 6025 6026 |
# File 'lib/syntax_tree/node.rb', line 6024 def comments [] end |
#format(q) ⇒ Object
6028 6029 6030 6031 6032 6033 6034 |
# File 'lib/syntax_tree/node.rb', line 6028 def format(q) if value == :nil q.text("**nil") else q.format(value) end end |