Sha256: 7fd16407b1bee5419db67f2b158a93931eefc619fc444d400c26ee7ab9addb09
Contents?: true
Size: 543 Bytes
Versions: 63
Compression:
Stored size: 543 Bytes
Contents
# frozen_string_literal: true # typed: true module T::Types # Validates that an object is equal to another Opus::Enum singleton value. class OpusEnum < Base attr_reader :val def initialize(val) @val = val end # @override Base def name @val.inspect end # @override Base def valid?(obj) @val == obj end # @override Base private def subtype_of_single?(other) case other when OpusEnum @val == other.val else false end end end end
Version data entries
63 entries across 63 versions & 1 rubygems