Sha256: 1527c0286dc8aadc76577db18d0d7496d6623c7e3d74e25515512f651709fa9f

Contents?: true

Size: 725 Bytes

Versions: 6

Compression:

Stored size: 725 Bytes

Contents

# encoding: utf-8

module Unparser
  class Emitter
    # Emitter for splats
    class KwSplat < self
      include Terminated

      handle :kwsplat

      children :subject

    private

      # Perform dispatch
      #
      # @return [undefined]
      #
      # @api private
      #
      def dispatch
        write(T_SPLAT, T_SPLAT)
        visit(subject)
      end
    end

    # Emitter for splats
    class Splat < self
      include Terminated

      handle :splat

      children :subject

    private

      # Perform dispatch
      #
      # @return [undefined]
      #
      # @api private
      #
      def dispatch
        write(T_SPLAT)
        visit(subject) if subject
      end
    end
  end
end # Unparser

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
unparser-0.2.4 lib/unparser/emitter/splat.rb
unparser-0.2.3 lib/unparser/emitter/splat.rb
unparser-0.2.2 lib/unparser/emitter/splat.rb
unparser-0.2.1 lib/unparser/emitter/splat.rb
unparser-0.2.0 lib/unparser/emitter/splat.rb
unparser-0.1.16 lib/unparser/emitter/splat.rb