Class: ActiveAdmin::BatchedExport::Configuration

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



12
13
14
15
16
17
18
19
20
21
22
# File 'lib/activeadmin/batched_export/configuration.rb', line 12

def initialize
  @styles = Styles.new
  @batch_size = 1000
  @max_batch_size = 10_000
  @large_export_row_threshold = 25_000
  @stimulus_controller = "activeadmin-batched-export--batched-export"
  @default_enabled = true
  @default_column_selection = true
  @filename_proc = nil
  @registered_macros = {}
end

Instance Attribute Details

#batch_sizeObject

Returns the value of attribute batch_size.



9
10
11
# File 'lib/activeadmin/batched_export/configuration.rb', line 9

def batch_size
  @batch_size
end

#default_column_selectionObject

Returns the value of attribute default_column_selection.



9
10
11
# File 'lib/activeadmin/batched_export/configuration.rb', line 9

def default_column_selection
  @default_column_selection
end

#default_enabledObject

Returns the value of attribute default_enabled.



9
10
11
# File 'lib/activeadmin/batched_export/configuration.rb', line 9

def default_enabled
  @default_enabled
end

#filename_procObject

Returns the value of attribute filename_proc.



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

def filename_proc
  @filename_proc
end

#large_export_row_thresholdObject

Returns the value of attribute large_export_row_threshold.



9
10
11
# File 'lib/activeadmin/batched_export/configuration.rb', line 9

def large_export_row_threshold
  @large_export_row_threshold
end

#max_batch_sizeObject

Returns the value of attribute max_batch_size.



9
10
11
# File 'lib/activeadmin/batched_export/configuration.rb', line 9

def max_batch_size
  @max_batch_size
end

#registered_macrosObject (readonly)

Returns the value of attribute registered_macros.



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

def registered_macros
  @registered_macros
end

#stimulus_controllerObject

Returns the value of attribute stimulus_controller.



9
10
11
# File 'lib/activeadmin/batched_export/configuration.rb', line 9

def stimulus_controller
  @stimulus_controller
end

#stylesObject

Returns the value of attribute styles.



9
10
11
# File 'lib/activeadmin/batched_export/configuration.rb', line 9

def styles
  @styles
end

Instance Method Details

#register_macro(name, callable) ⇒ Object



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

def register_macro(name, callable)
  ExportMacroCatalog.register(name, callable, registry: @registered_macros)
end