class SwitchUser::DataSources

Attributes

sources[R]

Public Class Methods

new(sources) click to toggle source
# File lib/switch_user/data_source.rb, line 7
def initialize(sources)
  @sources = sources
end

Public Instance Methods

all() click to toggle source
# File lib/switch_user/data_source.rb, line 11
def all
  sources.flat_map(&:all)
end
find_scope_id(scope_id) click to toggle source
# File lib/switch_user/data_source.rb, line 15
def find_scope_id(scope_id)
  sources.map { |source| source.find_scope_id(scope_id) }.compact.first
end