Sha256: ad8ce8c7b2dea1426a24005ad2d4dccec6a7c256588e22d401b60072b4fbc72b

Contents?: true

Size: 517 Bytes

Versions: 6

Compression:

Stored size: 517 Bytes

Contents

module Unparser
  class Emitter
    class Send
      # Emitter for unary sends
      class Unary < self

      private

        MAP = IceNine.deep_freeze(
          :'-@' => '-',
          :'+@' => '+'
        )

        # Perform dispatch
        #
        # @return [undefined]
        #
        # @api private
        #
        def dispatch
          name = selector
          write(MAP.fetch(name, name).to_s)
          visit(receiver)
        end

      end # Unary
    end # Send
  end # Emitter
end # Unparser

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
unparser-0.1.5 lib/unparser/emitter/send/unary.rb
unparser-0.1.4 lib/unparser/emitter/send/unary.rb
unparser-0.1.3 lib/unparser/emitter/send/unary.rb
unparser-0.1.2 lib/unparser/emitter/send/unary.rb
unparser-0.1.1 lib/unparser/emitter/send/unary.rb
unparser-0.1.0 lib/unparser/emitter/send/unary.rb