Sha256: 58724feaaca7de7a44a498fee2dabf1242f06e684cae3a663afb2977ccc98060
Contents?: true
Size: 633 Bytes
Versions: 10
Compression:
Stored size: 633 Bytes
Contents
# frozen_string_literal: true module Grumlin class TypedValue attr_reader :type, :value def initialize(type: nil, value: nil) @type = type @value = value end def to_bytecode @to_bytecode ||= if type.nil? value else { "@type": "g:#{type}", "@value": value } end end def inspect "<#{type}.#{value}>" end def to_s inspect end def to_readable_bytecode inspect end end end
Version data entries
10 entries across 10 versions & 1 rubygems