Sha256: 3f3257157dfff99954e37faf700e8ca271d40c1401aa75437c7b7547dd6e6772
Contents?: true
Size: 675 Bytes
Versions: 11
Compression:
Stored size: 675 Bytes
Contents
# frozen_string_literal: true module Unparser class Emitter class Send # Emitter for unary sends class Unary < self include Unterminated private MAP = IceNine.deep_freeze( '-@': '-', '+@': '+' ) # Perform dispatch # # @return [undefined] # # @api private # def dispatch name = selector write(MAP.fetch(name, name).to_s) if receiver.type.equal?(:int) && selector.equal?(:'+@') write('+') end visit(receiver) end end # Unary end # Send end # Emitter end # Unparser
Version data entries
11 entries across 11 versions & 1 rubygems