Class: CanTango::PermissionEngine::Store

Inherits:
Object
  • Object
show all
Defined in:
lib/cantango/permission_engine/store.rb

Direct Known Subclasses

MonetaStore, YamlStore

Instance Attribute Summary collapse

Instance Method Summary collapse

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, options = {}
  @name, @options = [name, options]

  options.each_pair do |name, value|
    var = :"@#{name}"
    self.instance_variable_set(var, value)
  end
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



6
7
8
# File 'lib/cantango/permission_engine/store.rb', line 6

def name
  @name
end

#optionsObject (readonly)

Returns the value of attribute options.



6
7
8
# File 'lib/cantango/permission_engine/store.rb', line 6

def options
  @options
end

Instance Method Details

#load!Object

Raises:

  • (NotImplementedError)


17
18
19
# File 'lib/cantango/permission_engine/store.rb', line 17

def load!
  raise NotImplementedError
end

#save!(permissions) ⇒ Object

Raises:

  • (NotImplementedError)


21
22
23
# File 'lib/cantango/permission_engine/store.rb', line 21

def save! permissions
  raise NotImplementedError
end