Module: Trailblazer::V1_1::Operation::Policy

Includes:
Setup
Defined in:
lib/trailblazer/1.1/operation/policy.rb,
lib/trailblazer/1.1/operation/policy/guard.rb

Overview

Policy::Guard is a very simple policy implementation. It adds #evaluate_policy to Operation#setup! and calls whatever you provided to ::policy.

trailblazer.to/gems/operation/policy.html#guard

Defined Under Namespace

Modules: DSL, Guard, Setup Classes: Permission

Instance Attribute Summary collapse

Class Method Summary collapse

Methods included from Setup

#setup!

Instance Attribute Details

#policyObject (readonly)

Returns the value of attribute policy


28
29
30
# File 'lib/trailblazer/1.1/operation/policy.rb', line 28

def policy
  @policy
end

Class Method Details

.included(includer) ⇒ Object


9
10
11
# File 'lib/trailblazer/1.1/operation/policy.rb', line 9

def self.included(includer)
  includer.extend DSL
end