Class: SwitchUser::UserSet::Record
- Inherits:
-
Struct
- Object
- Struct
- SwitchUser::UserSet::Record
- Defined in:
- lib/switch_user/user_set.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.build(user, set) ⇒ Object
60 61 62 63 64 65 66 |
# File 'lib/switch_user/user_set.rb', line 60 def self.build(user, set) id = user.send(set.identifier) label = user.send(set.label) scope = set.scope new(id, label, scope) end |
Instance Method Details
#scope_id ⇒ Object
68 69 70 |
# File 'lib/switch_user/user_set.rb', line 68 def scope_id "#{scope}_#{id}" end |