Sha256: 2ae2620fced0cc2541e46967cc2ee9896f7e2334cf4d59eab4375e463334d252

Contents?: true

Size: 293 Bytes

Versions: 2

Compression:

Stored size: 293 Bytes

Contents

# frozen_string_literal: true

require 'micro/case'

module Micro
  module Case
    class Base
      include Micro::Attributes::Features::ActiveModelValidations

      def call
        return Failure(:validation_error) { self.errors } unless valid?

        __call
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
u-case-1.0.0 lib/micro/case/with_validation.rb
u-case-1.0.0.rc1 lib/micro/case/with_validation.rb