Sha256: 0ff6a70621a393fe9908a957c2cdfdd816919171d1ce3668f2bc2971503932f0

Contents?: true

Size: 1.02 KB

Versions: 81

Compression:

Stored size: 1.02 KB

Contents

module Eco
  module API
    module Common
      module Loaders
        class Policy < Eco::API::Common::Loaders::CaseBase

          def initialize(policies)
            raise "Expected Eco::API::Policies. Given #{policies.class}" unless policies.is_a?(Eco::API::Policies)
            policies.define(self.name, &self.method(:main))
          end

          # @param people [Eco::API::Organization::People] the people in the queue of the current `job`
          # @param session [Eco::API::Session] the current session where the usecase kicks in.
          # @param options [Hash] the options that modify the case behaviour or bring some dependencies.
          # @param policy [Eco::API::Policies::Policy] the `policy` instance object.
          # @param job [Eco::API::Session::Batch::Job] the `Batch::Job` that these `people` belong to the queue thereof.
          def main(people, session, options, policy, job)
            raise "You should implement this method"
          end

        end
      end
    end
  end
end

Version data entries

81 entries across 81 versions & 1 rubygems

Version Path
eco-helpers-2.0.66 lib/eco/api/common/loaders/policy.rb
eco-helpers-2.0.65 lib/eco/api/common/loaders/policy.rb
eco-helpers-2.0.64 lib/eco/api/common/loaders/policy.rb
eco-helpers-2.0.63 lib/eco/api/common/loaders/policy.rb
eco-helpers-2.0.62 lib/eco/api/common/loaders/policy.rb
eco-helpers-2.0.61 lib/eco/api/common/loaders/policy.rb
eco-helpers-2.0.60 lib/eco/api/common/loaders/policy.rb
eco-helpers-2.0.59 lib/eco/api/common/loaders/policy.rb
eco-helpers-2.0.58 lib/eco/api/common/loaders/policy.rb
eco-helpers-2.0.57 lib/eco/api/common/loaders/policy.rb
eco-helpers-2.0.56 lib/eco/api/common/loaders/policy.rb
eco-helpers-2.0.55 lib/eco/api/common/loaders/policy.rb
eco-helpers-2.0.54 lib/eco/api/common/loaders/policy.rb
eco-helpers-2.0.53 lib/eco/api/common/loaders/policy.rb
eco-helpers-2.0.52 lib/eco/api/common/loaders/policy.rb
eco-helpers-2.0.51 lib/eco/api/common/loaders/policy.rb
eco-helpers-2.0.50 lib/eco/api/common/loaders/policy.rb
eco-helpers-2.0.49 lib/eco/api/common/loaders/policy.rb
eco-helpers-2.0.48 lib/eco/api/common/loaders/policy.rb
eco-helpers-2.0.47 lib/eco/api/common/loaders/policy.rb