Class: SyntaxTree::Params::KeywordRestFormatter
- Inherits:
-
Object
- Object
- SyntaxTree::Params::KeywordRestFormatter
- Defined in:
- lib/syntax_tree.rb
Instance Attribute Summary collapse
-
#value ⇒ Object
readonly
- :nil | 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.
8856 8857 8858 |
# File 'lib/syntax_tree.rb', line 8856 def initialize(value) @value = value end |
Instance Attribute Details
#value ⇒ Object (readonly)
- :nil | KwRestParam
-
the value of the parameter
8854 8855 8856 |
# File 'lib/syntax_tree.rb', line 8854 def value @value end |
Instance Method Details
#comments ⇒ Object
8860 8861 8862 |
# File 'lib/syntax_tree.rb', line 8860 def comments [] end |
#format(q) ⇒ Object
8864 8865 8866 8867 8868 8869 8870 |
# File 'lib/syntax_tree.rb', line 8864 def format(q) if value == :nil q.text("**nil") else q.format(value) end end |