Class: PhraseApp::RequestParams::LocaleDownloadParams
- Inherits:
-
OpenStruct
- Object
- OpenStruct
- PhraseApp::RequestParams::LocaleDownloadParams
- Defined in:
- lib/phraseapp-ruby.rb
Overview
LocaleDownloadParams
Parameters:
- convert_emoji
-
Indicates whether Emoji symbols should be converted to actual Emojis.
- file_format
-
File format name. See the format guide for all supported file formats.
- format_options
-
Additional options available for specific formats. See our format guide for complete list. [EXAMPLE]
- include_empty_translations
-
Indicates whether keys without translations should be included in the output as well.
- keep_notranslate_tags
-
Indicates whether [NOTRANSLATE] tags should be kept.
- tag
-
Limit result to keys tagged with the given tag (identified by its name).
Instance Method Summary collapse
- #convert_emoji=(val) ⇒ Object
- #file_format=(val) ⇒ Object
- #format_options=(val) ⇒ Object
- #include_empty_translations=(val) ⇒ Object
- #keep_notranslate_tags=(val) ⇒ Object
- #tag=(val) ⇒ Object
- #validate ⇒ Object
Instance Method Details
#convert_emoji=(val) ⇒ Object
1194 1195 1196 1197 1198 1199 1200 1201 1202 |
# File 'lib/phraseapp-ruby.rb', line 1194 def convert_emoji=(val) if val == "true" self.convert_emoji = true elsif val == "false" #ignore self.convert_emoji = b else PhraseApp::ParamsHelpers::ParamsValidationError.new("invalid value #{val}") end end |
#file_format=(val) ⇒ Object
1204 1205 1206 |
# File 'lib/phraseapp-ruby.rb', line 1204 def file_format=(val) self.file_format = val end |
#format_options=(val) ⇒ Object
1208 1209 1210 |
# File 'lib/phraseapp-ruby.rb', line 1208 def (val) self. = JSON.load(val) end |
#include_empty_translations=(val) ⇒ Object
1212 1213 1214 1215 1216 1217 1218 1219 1220 |
# File 'lib/phraseapp-ruby.rb', line 1212 def include_empty_translations=(val) if val == "true" self.include_empty_translations = true elsif val == "false" #ignore self.include_empty_translations = b else PhraseApp::ParamsHelpers::ParamsValidationError.new("invalid value #{val}") end end |
#keep_notranslate_tags=(val) ⇒ Object
1222 1223 1224 1225 1226 1227 1228 1229 1230 |
# File 'lib/phraseapp-ruby.rb', line 1222 def (val) if val == "true" self. = true elsif val == "false" #ignore self. = b else PhraseApp::ParamsHelpers::ParamsValidationError.new("invalid value #{val}") end end |
#tag=(val) ⇒ Object
1232 1233 1234 |
# File 'lib/phraseapp-ruby.rb', line 1232 def tag=(val) self.tag = val end |
#validate ⇒ Object
1236 1237 1238 1239 1240 |
# File 'lib/phraseapp-ruby.rb', line 1236 def validate if self.file_format == nil || self.file_format == "" raise PhraseApp::ParamsHelpers::ParamsValidationError.new("Required parameter \"file_format\" of \"locale_downloadParams\" not set") end end |