Class: AccessRoles::RoleType

Inherits:
Object
  • Object
show all
Defined in:
lib/access_roles/role_type.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(title, description, permissions) ⇒ RoleType

Returns a new instance of RoleType


7
8
9
10
11
12
# File 'lib/access_roles/role_type.rb', line 7

def initialize(title, description, permissions)
  @title = title.freeze
  @description = description.freeze
  @permissions = permissions.freeze
  freeze
end

Instance Attribute Details

#descriptionObject (readonly)

Returns the value of attribute description


4
5
6
# File 'lib/access_roles/role_type.rb', line 4

def description
  @description
end

#permissionsObject (readonly)

Returns the value of attribute permissions


4
5
6
# File 'lib/access_roles/role_type.rb', line 4

def permissions
  @permissions
end

#titleObject (readonly) Also known as: label

Returns the value of attribute title


4
5
6
# File 'lib/access_roles/role_type.rb', line 4

def title
  @title
end

Instance Method Details

#to_sObject


14
15
16
# File 'lib/access_roles/role_type.rb', line 14

def to_s
  title
end