Class: Ditty::ApplicationPolicy

Inherits:
Object
  • Object
show all
Defined in:
lib/ditty/policies/application_policy.rb

Defined Under Namespace

Classes: Scope

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(user, record) ⇒ ApplicationPolicy

Returns a new instance of ApplicationPolicy.



7
8
9
10
# File 'lib/ditty/policies/application_policy.rb', line 7

def initialize(user, record)
  @user = user
  @record = record
end

Instance Attribute Details

#recordObject (readonly)

Returns the value of attribute record.



5
6
7
# File 'lib/ditty/policies/application_policy.rb', line 5

def record
  @record
end

#userObject (readonly)

Returns the value of attribute user.



5
6
7
# File 'lib/ditty/policies/application_policy.rb', line 5

def user
  @user
end