Module: Holidays::Factory::Definition
- Defined in:
- lib/holidays/factory/definition.rb
Class Method Summary collapse
- .cache_repository ⇒ Object
- .custom_method_parser ⇒ Object
- .custom_method_proc_decorator ⇒ Object
- .custom_method_source_decorator ⇒ Object
- .custom_method_validator ⇒ Object
- .custom_methods_repository ⇒ Object
- .file_parser ⇒ Object
- .function_processor ⇒ Object
- .holidays_by_month_repository ⇒ Object
- .loader ⇒ Object
- .merger ⇒ Object
- .module_generator ⇒ Object
- .proc_result_cache_repository ⇒ Object
- .region_validator ⇒ Object
- .regions_generator ⇒ Object
- .regions_repository ⇒ Object
- .source_generator ⇒ Object
- .test_decorator ⇒ Object
- .test_generator ⇒ Object
- .test_parser ⇒ Object
Class Method Details
.cache_repository ⇒ Object
98 99 100 |
# File 'lib/holidays/factory/definition.rb', line 98 def cache_repository @cache_repo ||= Holidays::Definition::Repository::Cache.new end |
.custom_method_parser ⇒ Object
63 64 65 66 67 |
# File 'lib/holidays/factory/definition.rb', line 63 def custom_method_parser Holidays::Definition::Parser::CustomMethod.new( custom_method_validator, ) end |
.custom_method_proc_decorator ⇒ Object
69 70 71 |
# File 'lib/holidays/factory/definition.rb', line 69 def custom_method_proc_decorator Holidays::Definition::Decorator::CustomMethodProc.new end |
.custom_method_source_decorator ⇒ Object
73 74 75 |
# File 'lib/holidays/factory/definition.rb', line 73 def custom_method_source_decorator Holidays::Definition::Decorator::CustomMethodSource.new end |
.custom_method_validator ⇒ Object
83 84 85 |
# File 'lib/holidays/factory/definition.rb', line 83 def custom_method_validator Holidays::Definition::Validator::CustomMethod.new end |
.custom_methods_repository ⇒ Object
106 107 108 |
# File 'lib/holidays/factory/definition.rb', line 106 def custom_methods_repository @custom_methods_repository ||= Holidays::Definition::Repository::CustomMethods.new end |
.file_parser ⇒ Object
26 27 28 29 30 31 32 33 34 35 |
# File 'lib/holidays/factory/definition.rb', line 26 def file_parser Holidays::Definition::Context::Generator.new( custom_method_parser, custom_method_source_decorator, custom_methods_repository, test_parser, test_generator, module_generator, ) end |
.function_processor ⇒ Object
48 49 50 51 52 53 |
# File 'lib/holidays/factory/definition.rb', line 48 def function_processor Holidays::Definition::Context::FunctionProcessor.new( custom_methods_repository, proc_result_cache_repository, ) end |
.holidays_by_month_repository ⇒ Object
87 88 89 |
# File 'lib/holidays/factory/definition.rb', line 87 def holidays_by_month_repository @holidays_repo ||= Holidays::Definition::Repository::HolidaysByMonth.new end |
.loader ⇒ Object
114 115 116 117 118 119 |
# File 'lib/holidays/factory/definition.rb', line 114 def loader Holidays::Definition::Context::Load.new( merger, Holidays::FULL_DEFINITIONS_PATH, ) end |
.merger ⇒ Object
55 56 57 58 59 60 61 |
# File 'lib/holidays/factory/definition.rb', line 55 def merger Holidays::Definition::Context::Merger.new( holidays_by_month_repository, regions_repository, custom_methods_repository, ) end |
.module_generator ⇒ Object
121 122 123 |
# File 'lib/holidays/factory/definition.rb', line 121 def module_generator Holidays::Definition::Generator::Module.new end |
.proc_result_cache_repository ⇒ Object
102 103 104 |
# File 'lib/holidays/factory/definition.rb', line 102 def proc_result_cache_repository @proc_result_cache_repo ||= Holidays::Definition::Repository::ProcResultCache.new end |
.region_validator ⇒ Object
77 78 79 80 81 |
# File 'lib/holidays/factory/definition.rb', line 77 def region_validator Holidays::Definition::Validator::Region.new( regions_repository ) end |
.regions_generator ⇒ Object
110 111 112 |
# File 'lib/holidays/factory/definition.rb', line 110 def regions_generator Holidays::Definition::Generator::Regions.new end |
.regions_repository ⇒ Object
91 92 93 94 95 96 |
# File 'lib/holidays/factory/definition.rb', line 91 def regions_repository @regions_repo ||= Holidays::Definition::Repository::Regions.new( Holidays::REGIONS, Holidays::PARENT_REGION_LOOKUP, ) end |
.source_generator ⇒ Object
37 38 39 40 41 42 43 44 45 46 |
# File 'lib/holidays/factory/definition.rb', line 37 def source_generator Holidays::Definition::Context::Generator.new( custom_method_parser, custom_method_source_decorator, custom_methods_repository, test_parser, test_generator, module_generator, ) end |
.test_decorator ⇒ Object
131 132 133 |
# File 'lib/holidays/factory/definition.rb', line 131 def test_decorator Holidays::Definition::Decorator::Test.new end |
.test_generator ⇒ Object
125 126 127 128 129 |
# File 'lib/holidays/factory/definition.rb', line 125 def test_generator Holidays::Definition::Generator::Test.new( test_decorator, ) end |
.test_parser ⇒ Object
135 136 137 138 139 |
# File 'lib/holidays/factory/definition.rb', line 135 def test_parser Holidays::Definition::Parser::Test.new( Holidays::Definition::Validator::Test.new, ) end |