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.
8465 8466 8467 |
# File 'lib/syntax_tree.rb', line 8465 def initialize(value) @value = value end |
Instance Attribute Details
#value ⇒ Object (readonly)
- :nil | KwRestParam
-
the value of the parameter
8463 8464 8465 |
# File 'lib/syntax_tree.rb', line 8463 def value @value end |
Instance Method Details
#comments ⇒ Object
8469 8470 8471 |
# File 'lib/syntax_tree.rb', line 8469 def comments [] end |
#format(q) ⇒ Object
8473 8474 8475 8476 8477 8478 8479 |
# File 'lib/syntax_tree.rb', line 8473 def format(q) if value == :nil q.text("**nil") else q.format(value) end end |