Sha256: 1e1fcf438b4d5c2a23be3b81118973e990739cc02b7e5e006ffe5b984ae474e4

Contents?: true

Size: 303 Bytes

Versions: 1

Compression:

Stored size: 303 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) { {errors: self.errors} } unless valid?

        __call
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
u-case-1.1.0 lib/micro/case/with_validation.rb