diff --git a/lib/public/repositories/base.rb b/lib/public/repositories/base.rb index 2dbc80d..c6dcaf8 100644 --- a/lib/public/repositories/base.rb +++ b/lib/public/repositories/base.rb @@ -38,31 +38,6 @@ def read(dto:, context:) raise_error(__method__) end - sig { overridable.params(dto: T.untyped).returns(Outcome[Entity]) } - def create(dto:) - raise_error(__method__) - end - - sig { overridable.params(dto: T.untyped).returns(Outcome[Entity]) } - def update(dto:) - raise_error(__method__) - end - - sig { overridable.params(dto: T.untyped).returns(Outcome[Entity]) } - def delete(dto:) - raise_error(__method__) - end - - sig { params(dto: T.untyped).returns(Outcome[Entity]) } - def find(dto:) - read(dto: dto).entities.map do |array| - entity = array.first - return Outcome.missing_resource if entity.nil? - - entity - end - end - sig { overridable.params(entity: Entity, tags: T::Set[T.untyped]).returns(T::Hash[Symbol, T.untyped]) } def serialize(entity:, tags: []) serializer.serialize(entity: entity, tags: tags) diff --git a/lib/public/repositories/outcome.rb b/lib/public/repositories/outcome.rb index 900c1e2..e54adc0 100644 --- a/lib/public/repositories/outcome.rb +++ b/lib/public/repositories/outcome.rb @@ -10,9 +10,6 @@ module Outcome Elem = type_member(:out) interface! - - sig { abstract.returns(Elem) } - def unwrap!; end end end end