Module: Shaf::Authorize

Defined in:
lib/shaf/extensions/authorize.rb

Defined Under Namespace

Classes: MissingPolicyAction, NoPolicyError, PolicyViolationError

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#policy_classObject (readonly)

Returns the value of attribute policy_class.



9
10
11
# File 'lib/shaf/extensions/authorize.rb', line 9

def policy_class
  @policy_class
end

Class Method Details

.registered(app) ⇒ Object



11
12
13
# File 'lib/shaf/extensions/authorize.rb', line 11

def self.registered(app)
  app.helpers Helpers
end

Instance Method Details

#authorize_with(policy_class) ⇒ Object



15
16
17
# File 'lib/shaf/extensions/authorize.rb', line 15

def authorize_with(policy_class)
  @policy_class = policy_class
end