Sha256: 7e217058ceff3c9353540d2225b1efd63ca539d714d2130f77733f2a8b999597

Contents?: true

Size: 470 Bytes

Versions: 1

Compression:

Stored size: 470 Bytes

Contents

module BloodContracts::Core
  # Refinement type which represents data which is always correct
  class Anything < Refined

    # The type which is the result of data matching process
    # (for Anything is always self)
    #
    # @return [BC::Refined]
    #
    def match
      self
    end

    # Checks whether the data matches the expectations or not
    # (for Anything is always true)
    #
    # @return [Boolean]
    #
    def valid?
      true
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
blood_contracts-core-0.4.0 lib/blood_contracts/core/anything.rb