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
1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 |
# File 'lib/syntax_tree/node.rb', line 1300 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 |