Sha256: 1fe9dfa156ce870ed15cef366027a667ce7060c13dc0eab2f518f04258fb67d9

Contents?: true

Size: 565 Bytes

Versions: 16

Compression:

Stored size: 565 Bytes

Contents

# encoding: utf-8

module Unparser
  class Emitter
    class Literal

      # Array literal emitter
      class Array < self
        OPEN      = '['.freeze
        CLOSE     = ']'.freeze
        DELIMITER = ', '.freeze

        handle :array

      private

        # Perform dispatch
        #
        # @return [undefined]
        #
        # @api private
        #
        def dispatch
          parentheses(OPEN, CLOSE) do
            delimited(children, DELIMITER)
          end
        end

      end # Array

    end # Literal
  end # Emitter
end # Unparser

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
unparser-0.2.4 lib/unparser/emitter/literal/array.rb
unparser-0.2.3 lib/unparser/emitter/literal/array.rb
unparser-0.2.2 lib/unparser/emitter/literal/array.rb
unparser-0.2.1 lib/unparser/emitter/literal/array.rb
unparser-0.2.0 lib/unparser/emitter/literal/array.rb
unparser-0.1.16 lib/unparser/emitter/literal/array.rb
unparser-0.1.15 lib/unparser/emitter/literal/array.rb
unparser-0.1.14 lib/unparser/emitter/literal/array.rb
unparser-0.1.13 lib/unparser/emitter/literal/array.rb
unparser-0.1.12 lib/unparser/emitter/literal/array.rb
unparser-0.1.11 lib/unparser/emitter/literal/array.rb
unparser-0.1.10 lib/unparser/emitter/literal/array.rb
unparser-0.1.9 lib/unparser/emitter/literal/array.rb
unparser-0.1.8 lib/unparser/emitter/literal/array.rb
unparser-0.1.7 lib/unparser/emitter/literal/array.rb
unparser-0.1.6 lib/unparser/emitter/literal/array.rb