Module: Zen::Service::Plugins::Policies::ClassMethods

Defined in:
lib/zen/service/plugins/policies.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#denial_reasonObject

Returns the value of attribute denial_reason.



58
59
60
# File 'lib/zen/service/plugins/policies.rb', line 58

def denial_reason
  @denial_reason
end

#partialsObject

Returns the value of attribute partials.



58
59
60
# File 'lib/zen/service/plugins/policies.rb', line 58

def partials
  @partials
end

Instance Method Details

#deny_with(reason, &block) ⇒ Object



60
61
62
63
64
# File 'lib/zen/service/plugins/policies.rb', line 60

def deny_with(reason, &block)
  partial = Class.new(self, &block)
  partial.denial_reason = reason
  partials << partial
end