Sha256: 9e30cb47227719312dba4a182bfaa164be561a06cb25ba3c41a597638ec5f3bc
Contents?: true
Size: 1.08 KB
Versions: 10
Compression:
Stored size: 1.08 KB
Contents
# frozen_string_literal: true module Unparser class Emitter class Send # Emitter for send as attribute assignment class AttributeAssignment < self include Unterminated children :receiver, :selector, :first_argument # Perform regular dispatch # # @return [undefined] # # @api private # def dispatch emit_receiver emit_attribute write(T_ASN) if arguments.one? visit(first_argument) else parentheses { delimited(arguments) } end end private # Emit receiver # # @return [Parser::AST::Node] # # @api private # def emit_receiver visit(receiver) write(T_DOT) end # Emit attribute # # @return [undefined] # # @api private # def emit_attribute write(non_assignment_selector) end end # AttributeAssignment end # Send end # Emitter end # Unparser
Version data entries
10 entries across 10 versions & 1 rubygems