Class: SyntaxTree::HashKeyFormatter::Labels
- Inherits:
-
Object
- Object
- SyntaxTree::HashKeyFormatter::Labels
- Defined in:
- lib/syntax_tree/node.rb
Instance Method Summary collapse
Instance Method Details
#format_key(q, key) ⇒ Object
1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 |
# File 'lib/syntax_tree/node.rb', line 1333 def format_key(q, key) case key when Label q.format(key) when SymbolLiteral q.format(key.value) q.text(":") when DynaSymbol q.format(key) q.text(":") end end |