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
- #ios_builder ⇒ Object
- #json_builder ⇒ Object
- #properties_builder ⇒ Object
- #yaml_builder ⇒ Object
Instance Method Details
#android_builder ⇒ Object
30 31 32 |
# File 'lib/ad_localize/interactors/platforms/export_platform_factory.rb', line 30 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 |
# 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 else raise ArgumentError.new('Unknown platform for builder factory') end end |
#ios_builder ⇒ Object
34 35 36 |
# File 'lib/ad_localize/interactors/platforms/export_platform_factory.rb', line 34 def ios_builder @ios_builder ||= ExportIOSLocaleWording.new end |
#json_builder ⇒ Object
22 23 24 |
# File 'lib/ad_localize/interactors/platforms/export_platform_factory.rb', line 22 def json_builder @json_builder ||= ExportJSONLocaleWording.new end |
#properties_builder ⇒ Object
38 39 40 |
# File 'lib/ad_localize/interactors/platforms/export_platform_factory.rb', line 38 def properties_builder @properties_builder ||= ExportPropertiesLocaleWording.new end |
#yaml_builder ⇒ Object
26 27 28 |
# File 'lib/ad_localize/interactors/platforms/export_platform_factory.rb', line 26 def yaml_builder @yaml_builder ||= ExportYAMLLocaleWording.new end |