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
1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 |
# File 'lib/syntax_tree/node.rb', line 1659 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 |