Class: Reportinator::Config
- Inherits:
-
Base
- Object
- Base
- Reportinator::Config
show all
- Defined in:
- lib/reportinator/config.rb
Constant Summary
collapse
- DEFAULT_TYPES =
{
model: "Reportinator::ModelReport",
preset: "Reportinator::PresetReport"
}
- DEFAULT_REPORT_DIRS =
["reports", "app/reports"]
- DEFAULT_REPORT_SUFFIXES =
["report.json", "json"]
- DEFAULT_FUNCTIONS =
[
"Reportinator::HelperArrayFunction",
"Reportinator::JoinArrayFunction",
"Reportinator::RangeArrayFunction",
"Reportinator::StringArrayFunction",
"Reportinator::SnippetArrayFunction",
"Reportinator::FlattenArrayFunction",
"Reportinator::MethodArrayFunction",
"Reportinator::AdditionStringFunction",
"Reportinator::ConstantStringFunction",
"Reportinator::DateStringFunction",
"Reportinator::JoinStringFunction",
"Reportinator::LogicalStringFunction",
"Reportinator::NumberStringFunction",
"Reportinator::RangeStringFunction",
"Reportinator::SymbolStringFunction",
"Reportinator::VariableStringFunction"
]
- DEFAULT_UNPARSEDS =
[:snippets]
Instance Method Summary
collapse
Methods inherited from Base
config, #config, logger, #logger
Methods included from Helpers
#merge_hash, #merge_hash!, #symbolize_attributes
Instance Method Details
36
37
38
|
# File 'lib/reportinator/config.rb', line 36
def configured_directories
DEFAULT_REPORT_DIRS + report_directories
end
|
49
50
51
52
|
# File 'lib/reportinator/config.rb', line 49
def configured_functions
functions = DEFAULT_FUNCTIONS + parser_functions
functions.map { |function| function.constantize }
end
|
54
55
56
|
# File 'lib/reportinator/config.rb', line 54
def configured_metadata
DEFAULT_UNPARSEDS + unparsed_metadata
end
|
40
41
42
|
# File 'lib/reportinator/config.rb', line 40
def configured_suffixes
DEFAULT_REPORT_SUFFIXES + report_suffixes
end
|
44
45
46
47
|
# File 'lib/reportinator/config.rb', line 44
def configured_types
types = DEFAULT_TYPES
types.merge(report_types)
end
|