Class: SyntaxTree::HshPtn::KeywordRestFormatter
- Inherits:
-
Object
- Object
- SyntaxTree::HshPtn::KeywordRestFormatter
- Defined in:
- lib/syntax_tree.rb
Instance Attribute Summary collapse
-
#keyword_rest ⇒ Object
readonly
- VarField
-
the parameter that matches the remaining keywords.
Instance Method Summary collapse
- #comments ⇒ Object
- #format(q) ⇒ Object
-
#initialize(keyword_rest) ⇒ KeywordRestFormatter
constructor
A new instance of KeywordRestFormatter.
Constructor Details
#initialize(keyword_rest) ⇒ KeywordRestFormatter
Returns a new instance of KeywordRestFormatter.
6240 6241 6242 |
# File 'lib/syntax_tree.rb', line 6240 def initialize(keyword_rest) @keyword_rest = keyword_rest end |
Instance Attribute Details
#keyword_rest ⇒ Object (readonly)
- VarField
-
the parameter that matches the remaining keywords
6238 6239 6240 |
# File 'lib/syntax_tree.rb', line 6238 def keyword_rest @keyword_rest end |
Instance Method Details
#comments ⇒ Object
6244 6245 6246 |
# File 'lib/syntax_tree.rb', line 6244 def comments [] end |
#format(q) ⇒ Object
6248 6249 6250 6251 |
# File 'lib/syntax_tree.rb', line 6248 def format(q) q.text("**") q.format(keyword_rest) end |