Class: SyntaxTree::HashFormatter::Rockets
- 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
2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 |
# File 'lib/syntax_tree.rb', line 2027 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 |