Class: Eco::API::Common::Loaders::Policy

Inherits:
CaseBase show all
Defined in:
lib/eco/api/common/loaders/policy.rb

Instance Attribute Summary

Attributes included from Language::AuxiliarLogger

#logger

Instance Method Summary collapse

Methods inherited from CaseBase

#name, name_only_once!

Methods inherited from Base

<=>, created_at, set_created_at!

Methods included from ClassHelpers

#class_resolver, #descendants, #descendants?, #inheritable_attrs, #inheritable_class_vars, #inherited, #instance_variable_name, #new_class, #resolve_class, #to_constant

Methods included from Language::AuxiliarLogger

#log

Constructor Details

#initialize(policies) ⇒ Policy

rubocop:disable Lint/MissingSuper



6
7
8
9
10
11
# File 'lib/eco/api/common/loaders/policy.rb', line 6

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

Instance Method Details

#main(people, session, options, policy, job) ⇒ Object

Parameters:



18
19
20
# File 'lib/eco/api/common/loaders/policy.rb', line 18

def main(people, session, options, policy, job) # rubocop:disable Lint/UnusedMethodArgument
  raise "You should implement this method"
end