class SyntaxTree::AliasNode::AliasArgumentFormatter
Formats an argument to the alias keyword. For
symbol literals it uses the value of the symbol directly to look like bare words.
Attributes
Backref
|DynaSymbol
|GVar
|SymbolLiteral
-
the argument being passed
to alias
Public Class Methods
Source
# File lib/syntax_tree/node.rb, line 466 def initialize(argument) @argument = argument end
Public Instance Methods
Source
# File lib/syntax_tree/node.rb, line 470 def comments if argument.is_a?(SymbolLiteral) argument.comments + argument.value.comments else argument.comments end end
Source
# File lib/syntax_tree/node.rb, line 478 def format(q) if argument.is_a?(SymbolLiteral) q.format(argument.value) else q.format(argument) end end