class SwitchUser::Record
Attributes
source[R]
user[R]
Public Class Methods
new(user, source)
click to toggle source
# File lib/switch_user/data_source.rb, line 54 def initialize(user, source) @user = user @source = source end
Public Instance Methods
label()
click to toggle source
# File lib/switch_user/data_source.rb, line 59 def label user.send(source.name) end
scope()
click to toggle source
# File lib/switch_user/data_source.rb, line 63 def scope source.scope end
scope_id()
click to toggle source
# File lib/switch_user/data_source.rb, line 67 def scope_id "#{source.scope}_#{user.send(source.identifier)}" end