Class: Protector::DSL::Meta
- Inherits:
-
Object
- Object
- Protector::DSL::Meta
- Defined in:
- lib/protector/dsl.rb
Overview
DSL meta storage and evaluator
Defined Under Namespace
Classes: Box
Instance Method Summary collapse
-
#<<(block) ⇒ Object
Register another protection block.
-
#blocks ⇒ Object
Storage for
protect
blocks. -
#evaluate(adapter, model, subject, fields = [], entry = nil) ⇒ Object
Calculate protection at the context of subject.
Instance Method Details
#<<(block) ⇒ Object
Register another protection block
211 212 213 |
# File 'lib/protector/dsl.rb', line 211 def <<(block) blocks << block end |
#blocks ⇒ Object
Storage for protect
blocks
206 207 208 |
# File 'lib/protector/dsl.rb', line 206 def blocks @blocks ||= [] end |