Class: Tuersteher::ModelAccessRule
- Inherits:
-
BaseAccessRule
- Object
- BaseAccessRule
- Tuersteher::ModelAccessRule
- Defined in:
- lib/tuersteher.rb
Instance Attribute Summary
Attributes inherited from BaseAccessRule
Instance Method Summary collapse
-
#initialize(clazz) ⇒ ModelAccessRule
constructor
erzeugt neue Object-Zugriffsregel.
- #to_s ⇒ Object
Methods inherited from BaseAccessRule
#deny, #deny?, #extension, #fired?, #grant, #method, #not, #right, #role, #roles
Constructor Details
#initialize(clazz) ⇒ ModelAccessRule
erzeugt neue Object-Zugriffsregel
clazz Model-Klassenname(als Class oder String) oder :all fuer alle
696 697 698 699 700 701 702 |
# File 'lib/tuersteher.rb', line 696 def initialize(clazz) raise "wrong clazz '#{clazz}'! Must be a Class/String or :all ." unless clazz==:all or clazz.is_a?(Class) or clazz.is_a?(String) super() if clazz != :all # :all is only syntax sugar @rule_spezifications << ModelSpecification.new(clazz, @negation) end end |
Instance Method Details
#to_s ⇒ Object
705 706 707 |
# File 'lib/tuersteher.rb', line 705 def to_s @_to_s ||= super end |