Sha256: 13588acc2939ed1c58391341e03e16ef38778c9dfa0ad242b244634a7a67df8e

Contents?: true

Size: 455 Bytes

Versions: 9

Compression:

Stored size: 455 Bytes

Contents

# frozen_string_literal: true

require 'singleton' # Use the Singleton design pattern
require_relative 'boolean'

module Loxxy
  module Datatype
    # Class for representing a Lox true value.
    class True < Boolean
      include Singleton # Make a singleton class

      # Build the sole instance
      def initialize
        super(true)
      end
    end # class

    True.instance.freeze # Make the sole instance immutable
  end # module
end # module

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
loxxy-0.0.13 lib/loxxy/datatype/true.rb
loxxy-0.0.12 lib/loxxy/datatype/true.rb
loxxy-0.0.11 lib/loxxy/datatype/true.rb
loxxy-0.0.10 lib/loxxy/datatype/true.rb
loxxy-0.0.9 lib/loxxy/datatype/true.rb
loxxy-0.0.8 lib/loxxy/datatype/true.rb
loxxy-0.0.7 lib/loxxy/datatype/true.rb
loxxy-0.0.6 lib/loxxy/datatype/true.rb
loxxy-0.0.5 lib/loxxy/datatype/true.rb