Sha256: 9ca267dfbcf3245a9b367abd9c7714dc9e9390ec22600ca5d31abc7c00f3593c

Contents?: true

Size: 388 Bytes

Versions: 8

Compression:

Stored size: 388 Bytes

Contents

module Panda
  module Core
    module Services
      class BaseService
        def self.call(*args)
          new(*args).call
        end

        private

        def success(payload = {})
          OpenStruct.new(success?: true, payload: payload)
        end

        def failure(errors)
          OpenStruct.new(success?: false, errors: errors)
        end
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 2 rubygems

Version Path
panda-core-0.1.6 lib/panda/core/services/base_service.rb
panda-core-0.1.5 lib/panda/core/services/base_service.rb
panda-core-0.1.4 lib/panda/core/services/base_service.rb
panda-core-0.1.3 lib/panda/core/services/base_service.rb
panda-core-0.1.2 lib/panda/core/services/base_service.rb
panda-core-0.1.1 lib/panda/core/services/base_service.rb
panda-core-0.1.0 lib/panda/core/services/base_service.rb
panda_core-0.1.0 lib/panda/core/services/base_service.rb