class RoleCore::Permission

Attributes

callable[R]
name[R]
namespace[R]
priority[R]

Public Class Methods

new(name, _namespace: [], _priority: 0, _callable: false, **_options, &_block) click to toggle source
# File lib/role_core/permission.rb, line 7
def initialize(name, _namespace: [], _priority: 0, _callable: false, **_options, &_block)
  @name = name
  @namespace = _namespace
  @priority = _priority
  @callable = _callable
end

Public Instance Methods

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

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