Sha256: 9a86f74d8251b74e1506eab1f655bc0fac636234ff749e85f7aa6afd97495386

Contents?: true

Size: 602 Bytes

Versions: 3

Compression:

Stored size: 602 Bytes

Contents

module Unparser
  class Emitter
    class Literal

      # Base class for primitive emitters
      class Primitive < self

        children :value

      private

        # Emitter for primitives based on Object#inspect
        class Inspect < self

          handle :int, :str, :float, :sym

        private

          # Dispatch value
          #
          # @return [undefined]
          #
          # @api private
          #
          def dispatch
            buffer.append(value.inspect)
          end

        end # Inspect
      end # Primitive
    end # Literal
  end # Emitter
end # Unparser

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
unparser-0.0.8 lib/unparser/emitter/literal/primitive.rb
unparser-0.0.7 lib/unparser/emitter/literal/primitive.rb
unparser-0.0.6 lib/unparser/emitter/literal/primitive.rb