Sha256: fc636df2ccbaf5509d9306e69be347855dcf70f8f8ef480a3660e4a83509429b
Contents?: true
Size: 539 Bytes
Versions: 10
Compression:
Stored size: 539 Bytes
Contents
module Finitio module CollectionType def initialize(elm_type, name = nil, metadata = nil) unless elm_type.is_a?(Type) raise ArgumentError, "Finitio::Type expected, got `#{elm_type}`" end super(name, metadata) @elm_type = elm_type end attr_reader :elm_type def ==(other) super || (other.is_a?(self.class) && elm_type == other.elm_type) end alias :eql? :== def hash self.class.hash ^ self.elm_type.hash end end # module CollectionType end # module Finitio
Version data entries
10 entries across 10 versions & 1 rubygems