Sha256: 04dec73d15f6939c278314379f5863a46146ebc6456fa3a957707479cfa3d4ae

Contents?: true

Size: 1.09 KB

Versions: 8

Compression:

Stored size: 1.09 KB

Contents

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

      private

        # Return undefined
        #
        # @return [undefined]
        #
        # @api private
        #
        def dispatch
          emit_receiver
          emit_operator
          emit_right
        end

        # Emit receiver
        #
        # @return [undefined]
        #
        # @api private
        #
        def emit_receiver
          emit_unambiguous_receiver
        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(right_node)
        end

      end # Binary
    end # Send
  end # Emitter
end # Unparser

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
unparser-0.0.18 lib/unparser/emitter/send/binary.rb
unparser-0.0.16 lib/unparser/emitter/send/binary.rb
unparser-0.0.15 lib/unparser/emitter/send/binary.rb
unparser-0.0.14 lib/unparser/emitter/send/binary.rb
unparser-0.0.13 lib/unparser/emitter/send/binary.rb
unparser-0.0.12 lib/unparser/emitter/send/binary.rb
unparser-0.0.11 lib/unparser/emitter/send/binary.rb
unparser-0.0.10 lib/unparser/emitter/send/binary.rb