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
63 64 65 66 67 68 69 |
# File 'lib/switch_user/user_set.rb', line 63 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
71 72 73 |
# File 'lib/switch_user/user_set.rb', line 71 def scope_id "#{scope}_#{id}" end |