Class: ActiveJobTracker::Configuration
- Inherits:
-
Object
- Object
- ActiveJobTracker::Configuration
- Defined in:
- lib/active_job_tracker/configuration.rb
Overview
Configuration options for ActiveJobTracker
Instance Attribute Summary collapse
-
#auto_broadcast ⇒ Boolean
Whether to automatically broadcast changes.
-
#cache_threshold ⇒ Integer
Default cache threshold for progress updates.
-
#default_partial ⇒ String
Default partial path for rendering job trackers.
-
#default_target ⇒ Integer
Default target value for jobs.
-
#include_style ⇒ Boolean
Whether to include the style in the job tracker.
-
#raise_error_when_target_exceeded ⇒ Boolean
Whether to raise an error when progress increments the current value beyond the target value.
-
#turbo_stream_channel ⇒ String
The turbo stream channel to use for broadcasting job tracker updates.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
Initialize with default values.
Constructor Details
#initialize ⇒ Configuration
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_broadcast ⇒ Boolean
Whether to automatically broadcast changes
16 17 18 |
# File 'lib/active_job_tracker/configuration.rb', line 16 def auto_broadcast @auto_broadcast end |
#cache_threshold ⇒ Integer
Default cache threshold for progress updates
12 13 14 |
# File 'lib/active_job_tracker/configuration.rb', line 12 def cache_threshold @cache_threshold end |
#default_partial ⇒ String
Default partial path for rendering job trackers
20 21 22 |
# File 'lib/active_job_tracker/configuration.rb', line 20 def default_partial @default_partial end |
#default_target ⇒ Integer
Default target value for jobs
8 9 10 |
# File 'lib/active_job_tracker/configuration.rb', line 8 def default_target @default_target end |
#include_style ⇒ Boolean
Whether to include the style in the job tracker
28 29 30 |
# File 'lib/active_job_tracker/configuration.rb', line 28 def include_style @include_style end |
#raise_error_when_target_exceeded ⇒ Boolean
Whether to raise an error when progress increments the current value beyond the target value
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_channel ⇒ String
The turbo stream channel to use for broadcasting job tracker updates
32 33 34 |
# File 'lib/active_job_tracker/configuration.rb', line 32 def turbo_stream_channel @turbo_stream_channel end |