Class: SyntaxTree::HshPtn::KeywordRestFormatter

Inherits:
Object
  • Object
show all
Defined in:
lib/syntax_tree.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(keyword_rest) ⇒ KeywordRestFormatter

Returns a new instance of KeywordRestFormatter.



6619
6620
6621
# File 'lib/syntax_tree.rb', line 6619

def initialize(keyword_rest)
  @keyword_rest = keyword_rest
end

Instance Attribute Details

#keyword_restObject (readonly)

VarField

the parameter that matches the remaining keywords



6617
6618
6619
# File 'lib/syntax_tree.rb', line 6617

def keyword_rest
  @keyword_rest
end

Instance Method Details

#commentsObject



6623
6624
6625
# File 'lib/syntax_tree.rb', line 6623

def comments
  []
end

#format(q) ⇒ Object



6627
6628
6629
6630
# File 'lib/syntax_tree.rb', line 6627

def format(q)
  q.text("**")
  q.format(keyword_rest)
end