Sha256: 0d33f0dd88e38d1e4a6fb5f995fb27f9d0684c9c357006d83e8094fb12953c7d

Contents?: true

Size: 1.02 KB

Versions: 37

Compression:

Stored size: 1.02 KB

Contents

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

          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

37 entries across 37 versions & 1 rubygems

Version Path
eco-helpers-2.0.25 lib/eco/api/common/loaders/policy.rb
eco-helpers-2.0.24 lib/eco/api/common/loaders/policy.rb
eco-helpers-2.0.23 lib/eco/api/common/loaders/policy.rb
eco-helpers-2.0.22 lib/eco/api/common/loaders/policy.rb
eco-helpers-2.0.21 lib/eco/api/common/loaders/policy.rb
eco-helpers-2.0.19 lib/eco/api/common/loaders/policy.rb
eco-helpers-2.0.18 lib/eco/api/common/loaders/policy.rb
eco-helpers-2.0.17 lib/eco/api/common/loaders/policy.rb
eco-helpers-2.0.16 lib/eco/api/common/loaders/policy.rb
eco-helpers-2.0.15 lib/eco/api/common/loaders/policy.rb
eco-helpers-2.0.14 lib/eco/api/common/loaders/policy.rb
eco-helpers-2.0.13 lib/eco/api/common/loaders/policy.rb
eco-helpers-2.0.12 lib/eco/api/common/loaders/policy.rb
eco-helpers-2.0.11 lib/eco/api/common/loaders/policy.rb
eco-helpers-2.0.10 lib/eco/api/common/loaders/policy.rb
eco-helpers-2.0.9 lib/eco/api/common/loaders/policy.rb
eco-helpers-2.0.8 lib/eco/api/common/loaders/policy.rb
eco-helpers-2.0.7 lib/eco/api/common/loaders/policy.rb
eco-helpers-2.0.6 lib/eco/api/common/loaders/policy.rb
eco-helpers-2.0.5 lib/eco/api/common/loaders/policy.rb