Sha256: 991c8f9d05c104102445481b76da300b08aa9652057f5522445c0ab7e8b18af8
Contents?: true
Size: 687 Bytes
Versions: 21
Compression:
Stored size: 687 Bytes
Contents
require 'moneta' require 'active_support/inflector' module CanTango class PermissionEngine < Engine class MonetaStore < Store # one cache store is shared for all store instances (w different names) attr_reader :store # for a YamlStore, the name is the name of the yml file def initialize name, options = {} super @store = CanTango::Cache::MonetaCache.instance @store.configure_with options end def self.create name, options = {} super end def load! store.load! name end def store permissions store.save! name, permissions.map {|p| p.to_a } end end end end
Version data entries
21 entries across 21 versions & 1 rubygems