Sha256: 81f7aee0d61f0048be1c8dedf10b9988fe9cb7d9d5b58bf6c325644ac0cfe84e

Contents?: true

Size: 320 Bytes

Versions: 9

Compression:

Stored size: 320 Bytes

Contents

module Zapata
  module Primitive
    class Const < 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

9 entries across 9 versions & 1 rubygems

Version Path
zapata-0.1.6 lib/zapata/primitive/const.rb
zapata-0.1.5 lib/zapata/primitive/const.rb
zapata-0.1.4 lib/zapata/primitive/const.rb
zapata-0.1.3 lib/zapata/primitive/const.rb
zapata-0.1.2 lib/zapata/primitive/const.rb
zapata-0.1.1 lib/zapata/primitive/const.rb
zapata-0.1.0 lib/zapata/primitive/const.rb
zapata-0.0.3 lib/zapata/primitive/const.rb
zapata-0.0.2 lib/zapata/primitive/const.rb