Sha256: 7fc3cc1cab04b995fec476392e36427afdf0f8d30d24650bea6eb1b2f21a41c6
Contents?: true
Size: 596 Bytes
Versions: 21
Compression:
Stored size: 596 Bytes
Contents
module CanTango class PermissionEngine < Engine module Parser class Regex < Rule attr_reader :regex def parse target.gsub!(/\/(.*)\//, '\1') @regex = /#{target}/ build_statement end private def targets config_models.by_reg_exp(regex) end def build_statement targets.map do |target| "#{method} :#{action}, #{target.name}" end.join("\n") end def config_models CanTango.config.models end end end end end
Version data entries
21 entries across 21 versions & 1 rubygems