Class: Athar::Dashboard::ActorOptions

Inherits:
Object
  • Object
show all
Defined in:
lib/athar/dashboard/actor_options.rb

Defined Under Namespace

Classes: Result

Constant Summary collapse

LIMIT =
50

Instance Method Summary collapse

Constructor Details

#initialize(cutoff:) ⇒ ActorOptions

Returns a new instance of ActorOptions.



9
10
11
# File 'lib/athar/dashboard/actor_options.rb', line 9

def initialize(cutoff:)
  @cutoff = cutoff
end

Instance Method Details

#call(connection: ActiveRecord::Base.connection) ⇒ Object



13
14
15
16
17
18
19
# File 'lib/athar/dashboard/actor_options.rb', line 13

def call(connection: ActiveRecord::Base.connection)
  Result.new(
    users: load_users(connection),
    system: load_system(connection),
    anonymous_label: "(anonymous)"
  )
end