Sha256: 2be14b5d5416ea0d758a662bd3ddcaabfbfdefcd317c46e71601bc633dae1c4c

Contents?: true

Size: 956 Bytes

Versions: 6

Compression:

Stored size: 956 Bytes

Contents

module Unparser
  class Emitter
    class Send
      # Emitter for binary sends
      class Binary < self

      private

        # Return undefined
        #
        # @return [undefined]
        #
        # @api private
        #
        def dispatch
          visit_terminated(receiver)
          emit_operator
          emit_right
        end

        # Emit operator
        #
        # @return [undefined]
        #
        # @api private
        #
        def emit_operator
          write(WS, string_selector, WS)
        end

        # Return right node
        #
        # @return [Parser::AST::Node]
        #
        # @api private
        #
        def right_node
          children[2]
        end

        # Emit right
        #
        # @return [undefined]
        #
        # @api private
        #
        def emit_right
          visit_terminated(right_node)
        end

      end # Binary
    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/binary.rb
unparser-0.1.4 lib/unparser/emitter/send/binary.rb
unparser-0.1.3 lib/unparser/emitter/send/binary.rb
unparser-0.1.2 lib/unparser/emitter/send/binary.rb
unparser-0.1.1 lib/unparser/emitter/send/binary.rb
unparser-0.1.0 lib/unparser/emitter/send/binary.rb