Class: PhraseApp::TranslationParams
- Inherits:
-
OpenStruct
- Object
- OpenStruct
- PhraseApp::TranslationParams
- Defined in:
- lib/phraseapp-ruby.rb
Instance Method Summary collapse
-
#content=(val) ⇒ Object
:content, :excluded, :key_id, :locale_id, :plural_suffix, :unverified,.
- #excluded=(val) ⇒ Object
- #key_id=(val) ⇒ Object
- #locale_id=(val) ⇒ Object
- #plural_suffix=(val) ⇒ Object
- #unverified=(val) ⇒ Object
- #validate ⇒ Object
Instance Method Details
#content=(val) ⇒ Object
:content, :excluded, :key_id, :locale_id, :plural_suffix, :unverified,
679 680 681 |
# File 'lib/phraseapp-ruby.rb', line 679 def content=(val) self.content = val end |
#excluded=(val) ⇒ Object
683 684 685 686 687 688 689 690 691 |
# File 'lib/phraseapp-ruby.rb', line 683 def excluded=(val) if val == "true" self.excluded = true elsif val == "false" #ignore self.excluded = b else PhraseApp::ParamsValidationError.new("invalid value #{val}") end end |
#key_id=(val) ⇒ Object
693 694 695 |
# File 'lib/phraseapp-ruby.rb', line 693 def key_id=(val) self.key_id = val end |
#locale_id=(val) ⇒ Object
697 698 699 |
# File 'lib/phraseapp-ruby.rb', line 697 def locale_id=(val) self.locale_id = val end |
#plural_suffix=(val) ⇒ Object
701 702 703 |
# File 'lib/phraseapp-ruby.rb', line 701 def plural_suffix=(val) self.plural_suffix = val end |
#unverified=(val) ⇒ Object
705 706 707 708 709 710 711 712 713 |
# File 'lib/phraseapp-ruby.rb', line 705 def unverified=(val) if val == "true" self.unverified = true elsif val == "false" #ignore self.unverified = b else PhraseApp::ParamsValidationError.new("invalid value #{val}") end end |
#validate ⇒ Object
715 716 717 718 719 720 721 722 723 |
# File 'lib/phraseapp-ruby.rb', line 715 def validate if self.content == nil || self.content == "" raise PhraseApp::ParamsValidationError.new("Required parameter \"content\" of \"TranslationParams\" not set") endif self.key_id == nil raise PhraseApp::ParamsValidationError.new("Required parameter \"key_id\" of \"TranslationParams\" not set") endif self.locale_id == nil raise PhraseApp::ParamsValidationError.new("Required parameter \"locale_id\" of \"TranslationParams\" not set") end end |