Sha256: 67e0ae973c99866a7ddf63afd7772c2b552b2529040251d5ba692d530bfff5ea

Contents?: true

Size: 1.11 KB

Versions: 40

Compression:

Stored size: 1.11 KB

Contents

module Eco
  module API
    module Common
      module Loaders
        class Policy < Eco::API::Common::Loaders::CaseBase
          def initialize(policies) # rubocop:disable Lint/MissingSuper
            msg = "Expected Eco::API::Policies. Given #{policies.class}"
            raise msg unless policies.is_a?(Eco::API::Policies)

            policies.define(name, &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) # rubocop:disable Lint/UnusedMethodArgument
            raise "You should implement this method"
          end
        end
      end
    end
  end
end

Version data entries

40 entries across 40 versions & 1 rubygems

Version Path
eco-helpers-3.0.1 lib/eco/api/common/loaders/policy.rb
eco-helpers-3.0.0 lib/eco/api/common/loaders/policy.rb
eco-helpers-2.7.25 lib/eco/api/common/loaders/policy.rb
eco-helpers-2.7.24 lib/eco/api/common/loaders/policy.rb
eco-helpers-2.7.23 lib/eco/api/common/loaders/policy.rb
eco-helpers-2.7.22 lib/eco/api/common/loaders/policy.rb
eco-helpers-2.7.21 lib/eco/api/common/loaders/policy.rb
eco-helpers-2.7.20 lib/eco/api/common/loaders/policy.rb
eco-helpers-2.7.19 lib/eco/api/common/loaders/policy.rb
eco-helpers-2.7.18 lib/eco/api/common/loaders/policy.rb
eco-helpers-2.7.17 lib/eco/api/common/loaders/policy.rb
eco-helpers-2.7.16 lib/eco/api/common/loaders/policy.rb
eco-helpers-2.7.15 lib/eco/api/common/loaders/policy.rb
eco-helpers-2.7.14 lib/eco/api/common/loaders/policy.rb
eco-helpers-2.7.13 lib/eco/api/common/loaders/policy.rb
eco-helpers-2.7.12 lib/eco/api/common/loaders/policy.rb
eco-helpers-2.7.4 lib/eco/api/common/loaders/policy.rb
eco-helpers-2.7.2 lib/eco/api/common/loaders/policy.rb
eco-helpers-2.7.1 lib/eco/api/common/loaders/policy.rb
eco-helpers-2.7.0 lib/eco/api/common/loaders/policy.rb