Sha256: fa47945b46b6ec4f73c105cc9721b9cd8b344fd3926d4f05acd7d8bc40ce3870

Contents?: true

Size: 559 Bytes

Versions: 1

Compression:

Stored size: 559 Bytes

Contents

require "dry-initializer"
require_relative "./core/contract.rb"
require_relative "./core/type.rb"
require_relative "./core/version.rb"

BloodContract = BloodContracts::Core::Contract
BloodType = BloodContracts::Core::Type

module BloodContracts
  module Core; end

  class ContractFailure < Core::Type
    def errors
      context[:errors].to_h
    end

    def unpack
      context
    end
  end

  class Anything < Core::Type
    param :data
  end
end

module BC
  Anything = BloodContracts::Anything
  ContractFailure = BloodContracts::ContractFailure
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
blood_contracts-core-0.1.0 lib/blood_contracts/core.rb