Class: SyntaxTree::HashKeyFormatter::Rockets
- Inherits:
-
Object
- Object
- SyntaxTree::HashKeyFormatter::Rockets
- Defined in:
- lib/syntax_tree.rb
Instance Method Summary collapse
Instance Method Details
#format_key(q, key) ⇒ Object
2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 |
# File 'lib/syntax_tree.rb', line 2150 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 |