Class: AdLocalize::Interactors::Platforms::ExportPlatformFactory
- Inherits:
-
Object
- Object
- AdLocalize::Interactors::Platforms::ExportPlatformFactory
- Defined in:
- lib/ad_localize/interactors/platforms/export_platform_factory.rb
Instance Method Summary collapse
- #android_builder ⇒ Object
- #build(platform:) ⇒ Object
- #csv_builder ⇒ Object
- #ios_builder ⇒ Object
- #json_builder ⇒ Object
- #properties_builder ⇒ Object
- #yaml_builder ⇒ Object
Instance Method Details
#android_builder ⇒ Object
32 33 34 |
# File 'lib/ad_localize/interactors/platforms/export_platform_factory.rb', line 32 def android_builder @android_builder ||= ExportAndroidLocaleWording.new end |
#build(platform:) ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/ad_localize/interactors/platforms/export_platform_factory.rb', line 5 def build(platform:) case platform when 'json' json_builder when 'yml' yaml_builder when 'android' android_builder when 'ios' ios_builder when 'properties' properties_builder when 'csv' csv_builder else raise ArgumentError.new('Unknown platform for builder factory') end end |
#csv_builder ⇒ Object
44 45 46 |
# File 'lib/ad_localize/interactors/platforms/export_platform_factory.rb', line 44 def csv_builder @csv_builder ||= ExportCSVLocaleWording.new end |
#ios_builder ⇒ Object
36 37 38 |
# File 'lib/ad_localize/interactors/platforms/export_platform_factory.rb', line 36 def ios_builder @ios_builder ||= ExportIOSLocaleWording.new end |
#json_builder ⇒ Object
24 25 26 |
# File 'lib/ad_localize/interactors/platforms/export_platform_factory.rb', line 24 def json_builder @json_builder ||= ExportJSONLocaleWording.new end |
#properties_builder ⇒ Object
40 41 42 |
# File 'lib/ad_localize/interactors/platforms/export_platform_factory.rb', line 40 def properties_builder @properties_builder ||= ExportPropertiesLocaleWording.new end |
#yaml_builder ⇒ Object
28 29 30 |
# File 'lib/ad_localize/interactors/platforms/export_platform_factory.rb', line 28 def yaml_builder @yaml_builder ||= ExportYAMLLocaleWording.new end |