Class: SyntaxTree::HashKeyFormatter::Rockets
- Inherits:
-
Object
- Object
- SyntaxTree::HashKeyFormatter::Rockets
- Defined in:
- lib/syntax_tree/node.rb
Instance Method Summary collapse
Instance Method Details
#format_key(q, key) ⇒ Object
1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 |
# File 'lib/syntax_tree/node.rb', line 1348 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 |