Class: App42::Upload::UploadFileType

Inherits:
App42Response show all
Defined in:
lib/upload/UploadFileType.rb

Constant Summary collapse

AUDIO =
"AUDIO"
VIDEO =
"VIDEO"
IMAGE =
"IMAGE"
BINARY =
"BINARY"
TXT =
"TXT"
XML =
"XML"
CSV =
"CSV"
JSON =
"JSON"
OTHER =
"OTHER"

Instance Attribute Summary

Attributes inherited from App42Response

#isResponseSuccess, #strResponse, #totalRecords

Instance Method Summary collapse

Instance Method Details

#enum(string) ⇒ Object

Sets the value of the UploadFileType.

Parameters:

  • string
    • the string of UploadFileType.



48
49
50
# File 'lib/upload/UploadFileType.rb', line 48

def enum(string)
  return UploadFileType.const_get(string)
end

#isAvailable(string) ⇒ Object

Returns the value of the UploadFileType.

Returns:

  • the value of UploadFileType.



58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# File 'lib/upload/UploadFileType.rb', line 58

def isAvailable(string)
  if(string == "AUDIO")
    return "AUDIO"
  elsif(string == "VIDEO")
    return "VIDEO"
  elsif(string == "IMAGE")
    return "IMAGE"
  elsif(string == "BINARY")
    return "BINARY"
  elsif(string == "TXT")
    return "TXT"
  elsif(string == "XML")
    return "XML"
  elsif(string == "CSV")
    return "CSV"
  elsif(string == "JSON")
    return "JSON"
  elsif(string == "OTHER")
    return "OTHER";
  else
    return nil
  end
end