Class: CanTango::PermissionEngine::Store
- Inherits:
-
Object
- Object
- CanTango::PermissionEngine::Store
- Defined in:
- lib/cantango/permission_engine/store.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
-
#initialize(name, options = {}) ⇒ Store
constructor
A new instance of Store.
- #load! ⇒ Object
- #save!(permissions) ⇒ Object
Constructor Details
#initialize(name, options = {}) ⇒ Store
Returns a new instance of Store.
8 9 10 11 12 13 14 15 |
# File 'lib/cantango/permission_engine/store.rb', line 8 def initialize name, = {} @name, @options = [name, ] .each_pair do |name, value| var = :"@#{name}" self.instance_variable_set(var, value) end end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
6 7 8 |
# File 'lib/cantango/permission_engine/store.rb', line 6 def name @name end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
6 7 8 |
# File 'lib/cantango/permission_engine/store.rb', line 6 def @options end |
Instance Method Details
#load! ⇒ Object
17 18 19 |
# File 'lib/cantango/permission_engine/store.rb', line 17 def load! raise NotImplementedError end |
#save!(permissions) ⇒ Object
21 22 23 |
# File 'lib/cantango/permission_engine/store.rb', line 21 def save! raise NotImplementedError end |