Sha256: dc510112b346a7a65e1c2007adf650653153335216ca21b26b57201c2c2cfd14
Contents?: true
Size: 472 Bytes
Versions: 2
Compression:
Stored size: 472 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
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
loxxy-0.0.4 | lib/loxxy/datatype/true.rb |
loxxy-0.0.3 | lib/loxxy/datatype/true.rb |