Exception: Rublox::Errors::RoleNotFoundError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/rublox/util/errors.rb

Overview

Exception raised when a role doesn’t exist.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(role_id, group_id) ⇒ RoleNotFoundError

Returns a new instance of RoleNotFoundError.

Parameters:

  • role_id (Integer)
  • group_id (Integer)


77
78
79
80
81
# File 'lib/rublox/util/errors.rb', line 77

def initialize(role_id, group_id)
  @role_id = role_id
  @group_id = group_id
  super("The role of ID #{role_id} does not exist in group of ID #{group_id}.")
end

Instance Attribute Details

#group_idInteger (readonly)

Returns the given group’s ID.

Returns:

  • (Integer)

    the given group’s ID



73
74
75
# File 'lib/rublox/util/errors.rb', line 73

def group_id
  @group_id
end

#role_idInteger (readonly)

Returns the given role’s ID.

Returns:

  • (Integer)

    the given role’s ID



70
71
72
# File 'lib/rublox/util/errors.rb', line 70

def role_id
  @role_id
end