# Class BaseContext < Object

- app/contexts/base_context.rb

Methods

A
  - abilities
C
  - can?
N
  - new

Attributes

[RW] | current_user |
[RW] | params |
[RW] | project |

Class Public methods
new(project, user, params) Link

Source: show

    # File app/contexts/base_context.rb, line 4
    def initialize(project, user, params)
      @project, @current_user, @params = project, user, params.dup
    end

Instance Public methods
abilities() Link

Source: show

    # File app/contexts/base_context.rb, line 8
    def abilities
      @abilities ||= begin
                       abilities = Six.new
                       abilities << Ability
                       abilities
                     end
    end

can?(object, action, subject) Link

Source: show

    # File app/contexts/base_context.rb, line 16
    def can?(object, action, subject)
      abilities.allowed?(object, action, subject)
    end