Class: ActiveJobTracker::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/active_job_tracker/configuration.rb

Overview

Configuration options for ActiveJobTracker

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Initialize with default values



35
36
37
38
39
40
41
42
43
# File 'lib/active_job_tracker/configuration.rb', line 35

def initialize
  @default_target = 100
  @cache_threshold = 10
  @auto_broadcast = true
  @raise_error_when_target_exceeded = false
  @default_partial = "active_job_tracker/active_job_tracker"
  @include_style = true
  @turbo_stream_channel = "Turbo::StreamsChannel"
end

Instance Attribute Details

#auto_broadcastBoolean

Whether to automatically broadcast changes

Returns:

  • (Boolean)


16
17
18
# File 'lib/active_job_tracker/configuration.rb', line 16

def auto_broadcast
  @auto_broadcast
end

#cache_thresholdInteger

Default cache threshold for progress updates

Returns:

  • (Integer)


12
13
14
# File 'lib/active_job_tracker/configuration.rb', line 12

def cache_threshold
  @cache_threshold
end

#default_partialString

Default partial path for rendering job trackers

Returns:

  • (String)


20
21
22
# File 'lib/active_job_tracker/configuration.rb', line 20

def default_partial
  @default_partial
end

#default_targetInteger

Default target value for jobs

Returns:

  • (Integer)


8
9
10
# File 'lib/active_job_tracker/configuration.rb', line 8

def default_target
  @default_target
end

#include_styleBoolean

Whether to include the style in the job tracker

Returns:

  • (Boolean)


28
29
30
# File 'lib/active_job_tracker/configuration.rb', line 28

def include_style
  @include_style
end

#raise_error_when_target_exceededBoolean

Whether to raise an error when progress increments the current value beyond the target value

Returns:

  • (Boolean)


24
25
26
# File 'lib/active_job_tracker/configuration.rb', line 24

def raise_error_when_target_exceeded
  @raise_error_when_target_exceeded
end

#turbo_stream_channelString

The turbo stream channel to use for broadcasting job tracker updates

Returns:

  • (String)


32
33
34
# File 'lib/active_job_tracker/configuration.rb', line 32

def turbo_stream_channel
  @turbo_stream_channel
end