class RbacCore::Permission

Attributes

name[R]
priority[R]

Public Class Methods

new(name, priority: 0, **options, &block) click to toggle source
# File lib/rbac_core/permission.rb, line 7
def initialize(name, priority: 0, **options, &block)
  @name = name
  @priority = priority
end

Public Instance Methods

==(other) click to toggle source
# File lib/rbac_core/permission.rb, line 20
def ==(other)
  unless other.is_a?(RbacCore::Permission)
    return false
  end

  instance_values == other.instance_values
end
Also aliased as: eql?
call(context, *) click to toggle source
# File lib/rbac_core/permission.rb, line 12
def call(context, *)
  raise NotImplementedError
end
eql?(other)
Alias for: ==
hash() click to toggle source
# File lib/rbac_core/permission.rb, line 16
def hash
  instance_values.hash
end