Class: SessionRole
- Inherits:
-
Object
- Object
- SessionRole
- Defined in:
- app/models/session_role.rb
Instance Attribute Summary collapse
-
#current_role_ids ⇒ Object
Returns the value of attribute current_role_ids.
Instance Method Summary collapse
- #add_roles(ids) ⇒ Object
- #create(id) ⇒ Object
-
#initialize ⇒ SessionRole
constructor
A new instance of SessionRole.
Constructor Details
#initialize ⇒ SessionRole
Returns a new instance of SessionRole.
5 6 7 |
# File 'app/models/session_role.rb', line 5 def initialize @current_role_ids = [] end |
Instance Attribute Details
#current_role_ids ⇒ Object
Returns the value of attribute current_role_ids.
3 4 5 |
# File 'app/models/session_role.rb', line 3 def current_role_ids @current_role_ids end |
Instance Method Details
#add_roles(ids) ⇒ Object
9 10 11 |
# File 'app/models/session_role.rb', line 9 def add_roles(ids) @current_role_ids += ids end |
#create(id) ⇒ Object
13 14 15 |
# File 'app/models/session_role.rb', line 13 def create(id) @current_role_ids << id end |