Class: SyntaxTree::HashFormatter::Labels
- Defined in:
- lib/syntax_tree.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
#comments, #format, #initialize
Constructor Details
This class inherits a constructor from SyntaxTree::HashFormatter::Base
Instance Method Details
#format_key(q, key) ⇒ Object
2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 |
# File 'lib/syntax_tree.rb', line 2012 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 |