# File app/contexts/base_context.rb, line 4 def initialize(project, user, params) @project, @current_user, @params = project, user, params.dup end
# File app/contexts/base_context.rb, line 8 def abilities @abilities ||= begin abilities = Six.new abilities << Ability abilities end end
# File app/contexts/base_context.rb, line 16 def can?(object, action, subject) abilities.allowed?(object, action, subject) end