Class: SyntaxTree::Params::KeywordRestFormatter
- Inherits:
-
Object
- Object
- SyntaxTree::Params::KeywordRestFormatter
- Defined in:
- lib/syntax_tree.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.
9065 9066 9067 |
# File 'lib/syntax_tree.rb', line 9065 def initialize(value) @value = value end |
Instance Attribute Details
#value ⇒ Object (readonly)
- :nil | ArgsForward | KwRestParam
-
the value of the parameter
9063 9064 9065 |
# File 'lib/syntax_tree.rb', line 9063 def value @value end |
Instance Method Details
#comments ⇒ Object
9069 9070 9071 |
# File 'lib/syntax_tree.rb', line 9069 def comments [] end |
#format(q) ⇒ Object
9073 9074 9075 9076 9077 9078 9079 |
# File 'lib/syntax_tree.rb', line 9073 def format(q) if value == :nil q.text("**nil") else q.format(value) end end |