Class: PhraseApp::RequestParams::TranslationKeyParams
- Inherits:
-
OpenStruct
- Object
- OpenStruct
- PhraseApp::RequestParams::TranslationKeyParams
- Defined in:
- lib/phraseapp-ruby.rb
Overview
TranslationKeyParams
Parameters:
- data_type
-
data_type
- description
-
description
- localized_format_key
-
localized_format_key
- localized_format_string
-
localized_format_string
- max_characters_allowed
-
max_characters_allowed
- name
-
name
- name_plural
-
name_plural
- original_file
-
original_file
- plural
-
plural
- remove_screenshot
-
remove_screenshot
- screenshot
-
screenshot
- tags
-
tags
- unformatted
-
unformatted
- xml_space_preserve
-
xml_space_preserve
Instance Method Summary collapse
- #data_type=(val) ⇒ Object
- #description=(val) ⇒ Object
- #localized_format_key=(val) ⇒ Object
- #localized_format_string=(val) ⇒ Object
- #max_characters_allowed=(val) ⇒ Object
- #name=(val) ⇒ Object
- #name_plural=(val) ⇒ Object
- #original_file=(val) ⇒ Object
- #plural=(val) ⇒ Object
- #remove_screenshot=(val) ⇒ Object
- #screenshot=(val) ⇒ Object
- #tags=(val) ⇒ Object
- #unformatted=(val) ⇒ Object
- #validate ⇒ Object
- #xml_space_preserve=(val) ⇒ Object
Instance Method Details
#data_type=(val) ⇒ Object
396 397 398 |
# File 'lib/phraseapp-ruby.rb', line 396 def data_type=(val) self.data_type = val end |
#description=(val) ⇒ Object
400 401 402 |
# File 'lib/phraseapp-ruby.rb', line 400 def description=(val) self.description = val end |
#localized_format_key=(val) ⇒ Object
404 405 406 |
# File 'lib/phraseapp-ruby.rb', line 404 def localized_format_key=(val) self.localized_format_key = val end |
#localized_format_string=(val) ⇒ Object
408 409 410 |
# File 'lib/phraseapp-ruby.rb', line 408 def localized_format_string=(val) self.localized_format_string = val end |
#max_characters_allowed=(val) ⇒ Object
412 413 414 |
# File 'lib/phraseapp-ruby.rb', line 412 def max_characters_allowed=(val) self.max_characters_allowed = i.to_u end |
#name=(val) ⇒ Object
416 417 418 |
# File 'lib/phraseapp-ruby.rb', line 416 def name=(val) self.name = val end |
#name_plural=(val) ⇒ Object
420 421 422 |
# File 'lib/phraseapp-ruby.rb', line 420 def name_plural=(val) self.name_plural = val end |
#original_file=(val) ⇒ Object
424 425 426 |
# File 'lib/phraseapp-ruby.rb', line 424 def original_file=(val) self.original_file = val end |
#plural=(val) ⇒ Object
428 429 430 431 432 433 434 435 436 |
# File 'lib/phraseapp-ruby.rb', line 428 def plural=(val) if val == "true" self.plural = true elsif val == "false" #ignore self.plural = b else PhraseApp::ParamsHelpers::ParamsValidationError.new("invalid value #{val}") end end |
#remove_screenshot=(val) ⇒ Object
438 439 440 441 442 443 444 445 446 |
# File 'lib/phraseapp-ruby.rb', line 438 def remove_screenshot=(val) if val == "true" self.remove_screenshot = true elsif val == "false" #ignore self.remove_screenshot = b else PhraseApp::ParamsHelpers::ParamsValidationError.new("invalid value #{val}") end end |
#screenshot=(val) ⇒ Object
448 449 450 |
# File 'lib/phraseapp-ruby.rb', line 448 def screenshot=(val) self.screenshot = val end |
#tags=(val) ⇒ Object
452 453 454 |
# File 'lib/phraseapp-ruby.rb', line 452 def (val) self. = val.split(',') end |
#unformatted=(val) ⇒ Object
456 457 458 459 460 461 462 463 464 |
# File 'lib/phraseapp-ruby.rb', line 456 def unformatted=(val) if val == "true" self.unformatted = true elsif val == "false" #ignore self.unformatted = b else PhraseApp::ParamsHelpers::ParamsValidationError.new("invalid value #{val}") end end |
#validate ⇒ Object
476 477 478 479 480 |
# File 'lib/phraseapp-ruby.rb', line 476 def validate if self.name == nil || self.name == "" raise PhraseApp::ParamsHelpers::ParamsValidationError.new("Required parameter \"name\" of \"TranslationKeyParams\" not set") end end |
#xml_space_preserve=(val) ⇒ Object
466 467 468 469 470 471 472 473 474 |
# File 'lib/phraseapp-ruby.rb', line 466 def xml_space_preserve=(val) if val == "true" self.xml_space_preserve = true elsif val == "false" #ignore self.xml_space_preserve = b else PhraseApp::ParamsHelpers::ParamsValidationError.new("invalid value #{val}") end end |