Class: Casbin::Persist::Adapter
- Inherits:
-
Object
- Object
- Casbin::Persist::Adapter
- Defined in:
- lib/casbin-ruby/persist/adapter.rb
Overview
the interface for Casbin adapters.
Direct Known Subclasses
Casbin::Persist::Adapters::FileAdapter, BatchAdapter, FilteredAdapter
Instance Method Summary collapse
-
#add_policy(_sec, _ptype, _rule) ⇒ Object
adds a policy rule to the storage.
-
#load_policy(_model) ⇒ Object
loads all policy rules from the storage.
-
#remove_filtered_policy(_sec, _ptype, _field_index, *_field_values) ⇒ Object
removes policy rules that match the filter from the storage.
-
#remove_policy(_sec, _ptype, _rule) ⇒ Object
removes a policy rule from the storage.
-
#save_policy(_model) ⇒ Object
saves all policy rules to the storage.
Instance Method Details
#add_policy(_sec, _ptype, _rule) ⇒ Object
adds a policy rule to the storage.
14 |
# File 'lib/casbin-ruby/persist/adapter.rb', line 14 def add_policy(_sec, _ptype, _rule); end |
#load_policy(_model) ⇒ Object
loads all policy rules from the storage.
8 |
# File 'lib/casbin-ruby/persist/adapter.rb', line 8 def load_policy(_model); end |
#remove_filtered_policy(_sec, _ptype, _field_index, *_field_values) ⇒ Object
removes policy rules that match the filter from the storage. This is part of the Auto-Save feature.
21 |
# File 'lib/casbin-ruby/persist/adapter.rb', line 21 def remove_filtered_policy(_sec, _ptype, _field_index, *_field_values); end |
#remove_policy(_sec, _ptype, _rule) ⇒ Object
removes a policy rule from the storage.
17 |
# File 'lib/casbin-ruby/persist/adapter.rb', line 17 def remove_policy(_sec, _ptype, _rule); end |
#save_policy(_model) ⇒ Object
saves all policy rules to the storage.
11 |
# File 'lib/casbin-ruby/persist/adapter.rb', line 11 def save_policy(_model); end |