Sha256: 551d68a995aef897806e3f144de8ae5e3bf4e7f2ab665203d3a0f8cf3ead3fd1

Contents?: true

Size: 478 Bytes

Versions: 5

Compression:

Stored size: 478 Bytes

Contents

module ToSource
  class Emitter
    # Emiter for blocks
    class Block < self
      
      handle(Rubinius::AST::Block)

    private

      # Perform dispatch
      #
      # @return [undefined]
      #
      # @api private
      #
      def dispatch
        array = node.array
        max = array.length-1
        array.each_with_index do |node, index|
          visit(node)
          if index < max
            new_line
          end
        end
      end

    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
to_source-0.2.20 lib/to_source/emitter/block.rb
to_source-0.2.19 lib/to_source/emitter/block.rb
to_source-0.2.18 lib/to_source/emitter/block.rb
to_source-0.2.17 lib/to_source/emitter/block.rb
to_source-0.2.16 lib/to_source/emitter/block.rb