Sha256: 62cea7e8b547ba9fe6f5665c4d02ef725276fd00c8d62eb8931275f4f1164377
Contents?: true
Size: 619 Bytes
Versions: 21
Compression:
Stored size: 619 Bytes
Contents
module CanTango class PermissionEngine < Engine module Parser class Rule attr_reader :method, :action, :model, :target def initialize method, action, target @target = target @method = method @action = action end def parse end def parse_class target = nil @target = target if target try_class.to_s end def try_class target.constantize rescue raise "[permission] target #{target} does not have a class so it was skipped" end end end end end
Version data entries
21 entries across 21 versions & 1 rubygems