Sha256: 883fae3d8fa809e29e911e2929ca742bbb64f3b71b710f3c2904850af1be88c5

Contents?: true

Size: 646 Bytes

Versions: 2

Compression:

Stored size: 646 Bytes

Contents

# frozen_string_literal: true

class Acfs::Resource
  # @api private
  #
  # Provide methods for creating and processing CRUD operations and
  # handling responses. That includes error handling as well as
  # handling stubbed resources.
  #
  # Should only be used internal.
  #
  module Operational
    extend ActiveSupport::Concern

    def operation(*args, **kwargs, &block)
      self.class.operation(*args, **kwargs, &block)
    end

    module ClassMethods
      # Invoke CRUD operation.
      def operation(action, **opts, &block)
        Acfs.runner.process ::Acfs::Operation.new(self, action, **opts, &block)
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
acfs-1.7.0 lib/acfs/resource/operational.rb
acfs-1.6.0 lib/acfs/resource/operational.rb