Class: ActiveExport::Configuration
- Inherits:
-
Object
- Object
- ActiveExport::Configuration
- Defined in:
- lib/active_export/configuration.rb
Instance Attribute Summary collapse
-
#always_reload ⇒ Object
Set true, no cached YAML file data.
-
#default_csv_options ⇒ Object
Default options export CSV.
-
#default_find_in_batches_options ⇒ Object
Default options using ‘find_in_batches`.
-
#default_value_label_scope ⇒ Object
Export data default labels when value is nil or blank or true or false.
-
#no_source_raise_error ⇒ Object
Set true, if selected source file does not exists, ActiveExport raise error.
-
#sources ⇒ Object
YAML file list.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
18 19 20 21 22 23 24 25 |
# File 'lib/active_export/configuration.rb', line 18 def initialize @sources = {} @default_csv_options = { col_sep: ',', row_sep: "\n", force_quotes: true } @always_reload = false @default_value_label_scope = [:default_value_labels] @no_source_raise_error = false @default_find_in_batches_options = {} end |
Instance Attribute Details
#always_reload ⇒ Object
Set true, no cached YAML file data
12 13 14 |
# File 'lib/active_export/configuration.rb', line 12 def always_reload @always_reload end |
#default_csv_options ⇒ Object
Default options export CSV
8 9 10 |
# File 'lib/active_export/configuration.rb', line 8 def @default_csv_options end |
#default_find_in_batches_options ⇒ Object
Default options using ‘find_in_batches`
10 11 12 |
# File 'lib/active_export/configuration.rb', line 10 def @default_find_in_batches_options end |
#default_value_label_scope ⇒ Object
Export data default labels when value is nil or blank or true or false
14 15 16 |
# File 'lib/active_export/configuration.rb', line 14 def default_value_label_scope @default_value_label_scope end |
#no_source_raise_error ⇒ Object
Set true, if selected source file does not exists, ActiveExport raise error
16 17 18 |
# File 'lib/active_export/configuration.rb', line 16 def no_source_raise_error @no_source_raise_error end |
#sources ⇒ Object
YAML file list
6 7 8 |
# File 'lib/active_export/configuration.rb', line 6 def sources @sources end |