class Eco::API::Common::Loaders::Policy
Public Class Methods
new(policies)
click to toggle source
# File lib/eco/api/common/loaders/policy.rb, line 7 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
Public Instance Methods
main(people, session, options, policy, job)
click to toggle source
@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.
# File lib/eco/api/common/loaders/policy.rb, line 17 def main(people, session, options, policy, job) raise "You should implement this method" end