Class: PhraseApp::RequestParams::LocaleDownloadParams
- Inherits:
-
OpenStruct
- Object
- OpenStruct
- PhraseApp::RequestParams::LocaleDownloadParams
- Defined in:
- lib/phraseapp-ruby.rb
Overview
LocaleDownloadParams
Parameters:
- convert_emoji
-
convert_emoji
- file_format
-
file_format
- format_options
-
format_options
- include_empty_translations
-
include_empty_translations
- keep_notranslate_tags
-
keep_notranslate_tags
- tag_id
-
tag_id
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_id=(val) ⇒ Object
- #validate ⇒ Object
Instance Method Details
#convert_emoji=(val) ⇒ Object
1195 1196 1197 1198 1199 1200 1201 1202 1203 |
# File 'lib/phraseapp-ruby.rb', line 1195 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
1205 1206 1207 |
# File 'lib/phraseapp-ruby.rb', line 1205 def file_format=(val) self.file_format = val end |
#format_options=(val) ⇒ Object
1209 1210 1211 |
# File 'lib/phraseapp-ruby.rb', line 1209 def (val) self. = JSON.load(val) end |
#include_empty_translations=(val) ⇒ Object
1213 1214 1215 1216 1217 1218 1219 1220 1221 |
# File 'lib/phraseapp-ruby.rb', line 1213 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
1223 1224 1225 1226 1227 1228 1229 1230 1231 |
# File 'lib/phraseapp-ruby.rb', line 1223 def (val) if val == "true" self. = true elsif val == "false" #ignore self. = b else PhraseApp::ParamsHelpers::ParamsValidationError.new("invalid value #{val}") end end |
#tag_id=(val) ⇒ Object
1233 1234 1235 |
# File 'lib/phraseapp-ruby.rb', line 1233 def tag_id=(val) self.tag_id = val end |
#validate ⇒ Object
1237 1238 1239 1240 1241 |
# File 'lib/phraseapp-ruby.rb', line 1237 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 |