class App42::AppTab::BandwidthUnit

An enum that contains 4 types of the BandwidthUnit either KB or MB or GB or TB.

Constants

GB
KB
MB
TB

Public Instance Methods

enum(string) click to toggle source

Sets the value of the BandwidthUnit. KB or MB or GB or TB.

@param string

- the string of BandwidthUnit either KB or MB or GB or TB.
# File lib/appTab/BandwidthUnit.rb, line 31
def enum(string)
  return BandwidthUnit.const_get(string)
end
isAvailable(string) click to toggle source

Returns the value of the BandwidthUnit. KB or MB or GB or TB.

@return the value of BandwidthUnit.

# File lib/appTab/BandwidthUnit.rb, line 41
def isAvailable(string)
  if(string == "KB")
    return "KB"
  elsif(string == "MB")
    return "MB";
  elsif(string == "GB")
    return "GB";
  elsif(string == "TB")
    return "TB";
  else
    return nil
  end
end