class SyntaxTree::ArrayLiteral::QSymbolsFormatter
Formats an array of multiple simple symbol literals into the %i syntax.
Attributes
Args
-
the contents of the array
Public Class Methods
Source
# File lib/syntax_tree/node.rb, line 1098 def initialize(contents) @contents = contents end
Public Instance Methods
Source
# File lib/syntax_tree/node.rb, line 1102 def format(q) q.text("%i[") q.group do q.indent do q.breakable_empty q.seplist(contents.parts, BREAKABLE_SPACE_SEPARATOR) do |part| q.format(part.value) end end q.breakable_empty end q.text("]") end