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
- .merger ⇒ Object
- .proc_result_cache_repository ⇒ Object
- .region_validator ⇒ Object
- .regions_repository ⇒ Object
- .source_generator ⇒ Object
Class Method Details
.cache_repository ⇒ Object
82 83 84 |
# File 'lib/holidays/factory/definition.rb', line 82 def cache_repository @cache_repo ||= Holidays::Definition::Repository::Cache.new end |
.custom_method_parser ⇒ Object
50 51 52 53 54 |
# File 'lib/holidays/factory/definition.rb', line 50 def custom_method_parser Holidays::Definition::Parser::CustomMethod.new( custom_method_validator, ) end |
.custom_method_proc_decorator ⇒ Object
56 57 58 |
# File 'lib/holidays/factory/definition.rb', line 56 def custom_method_proc_decorator Holidays::Definition::Decorator::CustomMethodProc.new end |
.custom_method_source_decorator ⇒ Object
60 61 62 |
# File 'lib/holidays/factory/definition.rb', line 60 def custom_method_source_decorator Holidays::Definition::Decorator::CustomMethodSource.new end |
.custom_method_validator ⇒ Object
70 71 72 |
# File 'lib/holidays/factory/definition.rb', line 70 def custom_method_validator Holidays::Definition::Validator::CustomMethod.new end |
.custom_methods_repository ⇒ Object
90 91 92 |
# File 'lib/holidays/factory/definition.rb', line 90 def custom_methods_repository @custom_methods_repository ||= Holidays::Definition::Repository::CustomMethods.new end |
.file_parser ⇒ Object
19 20 21 22 23 24 25 |
# File 'lib/holidays/factory/definition.rb', line 19 def file_parser Holidays::Definition::Context::Generator.new( custom_method_parser, custom_method_source_decorator, custom_methods_repository, ) end |
.function_processor ⇒ Object
35 36 37 38 39 40 |
# File 'lib/holidays/factory/definition.rb', line 35 def function_processor Holidays::Definition::Context::FunctionProcessor.new( custom_methods_repository, proc_result_cache_repository, ) end |
.holidays_by_month_repository ⇒ Object
74 75 76 |
# File 'lib/holidays/factory/definition.rb', line 74 def holidays_by_month_repository @holidays_repo ||= Holidays::Definition::Repository::HolidaysByMonth.new end |
.merger ⇒ Object
42 43 44 45 46 47 48 |
# File 'lib/holidays/factory/definition.rb', line 42 def merger Holidays::Definition::Context::Merger.new( holidays_by_month_repository, regions_repository, custom_methods_repository, ) end |
.proc_result_cache_repository ⇒ Object
86 87 88 |
# File 'lib/holidays/factory/definition.rb', line 86 def proc_result_cache_repository @proc_result_cache_repo ||= Holidays::Definition::Repository::ProcResultCache.new end |
.region_validator ⇒ Object
64 65 66 67 68 |
# File 'lib/holidays/factory/definition.rb', line 64 def region_validator Holidays::Definition::Validator::Region.new( regions_repository ) end |
.regions_repository ⇒ Object
78 79 80 |
# File 'lib/holidays/factory/definition.rb', line 78 def regions_repository @regions_repo ||= Holidays::Definition::Repository::Regions.new end |
.source_generator ⇒ Object
27 28 29 30 31 32 33 |
# File 'lib/holidays/factory/definition.rb', line 27 def source_generator Holidays::Definition::Context::Generator.new( custom_method_parser, custom_method_source_decorator, custom_methods_repository, ) end |