Sha256: 0c0df0e4c5d39ec0509a9d3a4e815b188f9efe1d7b36fb3365f4ac0ad6d870df

Contents?: true

Size: 537 Bytes

Versions: 6

Compression:

Stored size: 537 Bytes

Contents

module Unparser
  class Emitter
    # Base class for pre and postexe emitters
    class Hookexe < self

      MAP = {
        preexe:  K_PREEXE,
        postexe: K_POSTEXE
      }.freeze

      handle(*MAP.keys)

      children :body

    private

      # Perfrom dispatch
      #
      # @return [undefined]
      #
      # @api private
      #
      def dispatch
        write(MAP.fetch(node.type), WS)
        parentheses(*CURLY_BRACKETS) do
          emit_body
        end
      end

    end # Hookexe
  end # Emitter
end # Unparser

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
unparser-0.2.8 lib/unparser/emitter/hookexe.rb
unparser-0.2.7 lib/unparser/emitter/hookexe.rb
unparser-0.2.6 lib/unparser/emitter/hookexe.rb
unparser-0.2.5 lib/unparser/emitter/hookexe.rb
unparser-0.1.5 lib/unparser/emitter/hookexe.rb
unparser-0.1.4 lib/unparser/emitter/hookexe.rb