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.
8933 8934 8935 |
# File 'lib/syntax_tree.rb', line 8933 def initialize(value) @value = value end |
Instance Attribute Details
#value ⇒ Object (readonly)
- :nil | KwRestParam
-
the value of the parameter
8931 8932 8933 |
# File 'lib/syntax_tree.rb', line 8931 def value @value end |
Instance Method Details
#comments ⇒ Object
8937 8938 8939 |
# File 'lib/syntax_tree.rb', line 8937 def comments [] end |
#format(q) ⇒ Object
8941 8942 8943 8944 8945 8946 8947 |
# File 'lib/syntax_tree.rb', line 8941 def format(q) if value == :nil q.text("**nil") else q.format(value) end end |