Class: Eco::API::Common::Loaders::Policy
- Defined in:
- lib/eco/api/common/loaders/policy.rb
Direct Known Subclasses
Eco::API::Custom::Policy, Policies::DefaultPolicies::UserAccess
Instance Attribute Summary
Attributes included from Language::AuxiliarLogger
Instance Method Summary collapse
-
#initialize(policies) ⇒ Policy
constructor
rubocop:disable Lint/MissingSuper.
- #main(people, session, options, policy, job) ⇒ Object
Methods inherited from CaseBase
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
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
18 19 20 |
# File 'lib/eco/api/common/loaders/policy.rb', line 18 def main(people, session, , policy, job) # rubocop:disable Lint/UnusedMethodArgument raise "You should implement this method" end |