Class: SyntaxTree::HashFormatter::Rockets
- Defined in:
- lib/syntax_tree.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
#comments, #format, #initialize
Constructor Details
This class inherits a constructor from SyntaxTree::HashFormatter::Base
Instance Method Details
#format_key(q, key) ⇒ Object
2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 |
# File 'lib/syntax_tree.rb', line 2137 def format_key(q, key) case key when Label q.text(":") q.text(key.value.chomp(":")) when DynaSymbol q.text(":") q.format(key) else q.format(key) end q.text(" =>") end |