Class: PhraseApp::LocaleDownloadParams

Inherits:
OpenStruct
  • Object
show all
Defined in:
lib/phraseapp-ruby.rb

Instance Method Summary collapse

Instance Method Details

#convert_emoji=(val) ⇒ Object

:convert_emoji, :file_format, :format_options, :include_empty_translations, :keep_notranslate_tags, :tag_id,



939
940
941
942
943
944
945
946
947
# File 'lib/phraseapp-ruby.rb', line 939

def convert_emoji=(val)
  if val == "true"
    self.convert_emoji = true
  elsif val == "false" #ignore
    self.convert_emoji = b
  else
    PhraseApp::ParamsValidationError.new("invalid value #{val}")
  end
end

#file_format=(val) ⇒ Object



949
950
951
# File 'lib/phraseapp-ruby.rb', line 949

def file_format=(val)
  self.file_format = val
end

#format_options=(val) ⇒ Object



953
954
955
# File 'lib/phraseapp-ruby.rb', line 953

def format_options=(val)
  self.format_options = JSON.load(val)
end

#include_empty_translations=(val) ⇒ Object



957
958
959
960
961
962
963
964
965
# File 'lib/phraseapp-ruby.rb', line 957

def include_empty_translations=(val)
  if val == "true"
    self.include_empty_translations = true
  elsif val == "false" #ignore
    self.include_empty_translations = b
  else
    PhraseApp::ParamsValidationError.new("invalid value #{val}")
  end
end

#keep_notranslate_tags=(val) ⇒ Object



967
968
969
970
971
972
973
974
975
# File 'lib/phraseapp-ruby.rb', line 967

def keep_notranslate_tags=(val)
  if val == "true"
    self.keep_notranslate_tags = true
  elsif val == "false" #ignore
    self.keep_notranslate_tags = b
  else
    PhraseApp::ParamsValidationError.new("invalid value #{val}")
  end
end

#tag_id=(val) ⇒ Object



977
978
979
# File 'lib/phraseapp-ruby.rb', line 977

def tag_id=(val)
  self.tag_id = val
end

#validate ⇒ Object



981
982
983
984
985
# File 'lib/phraseapp-ruby.rb', line 981

def validate
  if self.file_format == nil || self.file_format == "" 
    raise PhraseApp::ParamsValidationError.new("Required parameter \"file_format\" of \"locale_downloadParams\" not set")
  end
end