Sha256: 2708d2d80850361d21e50b9c54050d12552550ebbca28a22fde92deb3a131d85
Contents?: true
Size: 540 Bytes
Versions: 15
Compression:
Stored size: 540 Bytes
Contents
# frozen_string_literal: true module Unparser module Writer class Send # Writer for unary sends class Unary < self MAP = { '-@': '-', '+@': '+' }.freeze private_constant(*constants(false)) def dispatch name = selector write(MAP.fetch(name, name).to_s) if n_int?(receiver) && selector.equal?(:+@) write('+') end visit(receiver) end end # Unary end # Send end # Writer end # Unparser
Version data entries
15 entries across 15 versions & 2 rubygems