Class: ImportPolicy

Inherits:
Struct
  • Object
show all
Defined in:
app/policies/import_policy.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#importObject

Returns the value of attribute import

Returns:

  • (Object)

    the current value of import


1
2
3
# File 'app/policies/import_policy.rb', line 1

def import
  @import
end

#userObject

Returns the value of attribute user

Returns:

  • (Object)

    the current value of user


1
2
3
# File 'app/policies/import_policy.rb', line 1

def user
  @user
end

Instance Method Details

#admin?Boolean

Returns:

  • (Boolean)

4
5
6
# File 'app/policies/import_policy.rb', line 4

def admin?
  user and user.admin?
end

#index?Boolean

Returns:

  • (Boolean)

2
# File 'app/policies/import_policy.rb', line 2

def index?; admin?; end