Sha256: 08718b1f252ffd4899f0c7cf5a94974665a72cc71eb9d40115c72ea7875cf20f

Contents?: true

Size: 335 Bytes

Versions: 1

Compression:

Stored size: 335 Bytes

Contents

# frozen_string_literal: true

module Zapata
  module Primitive
    class Casgn < Base
      def node
        modul, name, body = @code.to_a
        type = @code.type
        OpenStruct.new(type: type, modul: modul, name: name, body: body)
      end

      def literal
        Diver.dive(node.body).literal
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
zapata-1.0.0 lib/zapata/primitive/casgn.rb