Class: SwitchUser::DataSource

Inherits:
Struct
  • Object
show all
Defined in:
lib/switch_user/data_source.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#identifier ⇒ Object

Returns the value of attribute identifier

Returns:

  • (Object) —

    the current value of identifier



2
3
4
# File 'lib/switch_user/data_source.rb', line 2

def identifier
  @identifier
end

#loader ⇒ Object

Returns the value of attribute loader

Returns:

  • (Object) —

    the current value of loader



2
3
4
# File 'lib/switch_user/data_source.rb', line 2

def loader
  @loader
end

#name ⇒ Object

Returns the value of attribute name

Returns:

  • (Object) —

    the current value of name



2
3
4
# File 'lib/switch_user/data_source.rb', line 2

def name
  @name
end

#scope ⇒ Object

Returns the value of attribute scope

Returns:

  • (Object) —

    the current value of scope



2
3
4
# File 'lib/switch_user/data_source.rb', line 2

def scope
  @scope
end

Instance Method Details

#users ⇒ Object



3
4
5
# File 'lib/switch_user/data_source.rb', line 3

def users
  loader.call.map {|u| Record.new(u, self) }
end