Module: Holidays::DefinitionFactory
- Defined in:
- lib/holidays/definition_factory.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
- .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
73 74 75 |
# File 'lib/holidays/definition_factory.rb', line 73 def cache_repository @cache_repo ||= Definition::Repository::Cache.new end |
.custom_method_parser ⇒ Object
41 42 43 44 45 |
# File 'lib/holidays/definition_factory.rb', line 41 def custom_method_parser Definition::Parser::CustomMethod.new( custom_method_validator, ) end |
.custom_method_proc_decorator ⇒ Object
47 48 49 |
# File 'lib/holidays/definition_factory.rb', line 47 def custom_method_proc_decorator Definition::Decorator::CustomMethodProc.new end |
.custom_method_source_decorator ⇒ Object
51 52 53 |
# File 'lib/holidays/definition_factory.rb', line 51 def custom_method_source_decorator Definition::Decorator::CustomMethodSource.new end |
.custom_method_validator ⇒ Object
61 62 63 |
# File 'lib/holidays/definition_factory.rb', line 61 def custom_method_validator Definition::Validator::CustomMethod.new end |
.custom_methods_repository ⇒ Object
81 82 83 |
# File 'lib/holidays/definition_factory.rb', line 81 def custom_methods_repository @custom_methods_repository ||= Definition::Repository::CustomMethods.new end |
.file_parser ⇒ Object
17 18 19 20 21 22 23 |
# File 'lib/holidays/definition_factory.rb', line 17 def file_parser Definition::Context::Generator.new( custom_method_parser, custom_method_source_decorator, custom_methods_repository, ) end |
.holidays_by_month_repository ⇒ Object
65 66 67 |
# File 'lib/holidays/definition_factory.rb', line 65 def holidays_by_month_repository @holidays_repo ||= Definition::Repository::HolidaysByMonth.new end |
.merger ⇒ Object
33 34 35 36 37 38 39 |
# File 'lib/holidays/definition_factory.rb', line 33 def merger Definition::Context::Merger.new( holidays_by_month_repository, regions_repository, custom_methods_repository, ) end |
.proc_result_cache_repository ⇒ Object
77 78 79 |
# File 'lib/holidays/definition_factory.rb', line 77 def proc_result_cache_repository @proc_result_cache_repo ||= Definition::Repository::ProcResultCache.new end |
.region_validator ⇒ Object
55 56 57 58 59 |
# File 'lib/holidays/definition_factory.rb', line 55 def region_validator Definition::Validator::Region.new( regions_repository ) end |
.regions_repository ⇒ Object
69 70 71 |
# File 'lib/holidays/definition_factory.rb', line 69 def regions_repository @regions_repo ||= Definition::Repository::Regions.new end |
.source_generator ⇒ Object
25 26 27 28 29 30 31 |
# File 'lib/holidays/definition_factory.rb', line 25 def source_generator Definition::Context::Generator.new( custom_method_parser, custom_method_source_decorator, custom_methods_repository, ) end |