Sha256: 47951d11411a3102f7681f3f06aff2a7b06acb13e92a8d7bc560e91fe1345474

Contents?: true

Size: 331 Bytes

Versions: 1

Compression:

Stored size: 331 Bytes

Contents

module Zapata
  module Primitive
    class Const < Primitive::Basic
      def node
        modul, klass = @code.to_a
        type = @code.type
        OpenStruct.new(modul: modul, klass: klass, type: type)
      end

      def to_raw
        Raw.new(:const, [node.modul, node.klass].compact.join('::'))
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
zapata-0.0.1 lib/zapata/primitive/const.rb