Sha256: 704dcdaa4fcf547108378b1219428260aebc29bdea0f4c8a2ecb71dd05f4ba80
Contents?: true
Size: 1.04 KB
Versions: 1
Compression:
Stored size: 1.04 KB
Contents
require 'App42Response.rb' module App42 module AppTab # # An enum that contains the Storage Unit to be mentioned in the Bill. # class StorageUnit < App42Response unless (const_defined?(:KB)) KB = "KB" end unless (const_defined?(:MB)) MB = "MB" end unless (const_defined?(:GB)) GB = "GB" end unless (const_defined?(:TB)) TB = "TB" end # # Sets the value of the StorageUnit. # # @param string # - the string of StorageUnit # def enum(string) return StorageUnit.const_get(string) end # # Returns the value of the StorageUnit. # # @return the value of StorageUnit. # 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 end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
App42_RUBY_SDK-0.8.3 | lib/appTab/StorageUnit.rb |