Class: App42::AppTab::StorageUnit
- Inherits:
-
App42Response
- Object
- App42Response
- App42::AppTab::StorageUnit
- Defined in:
- lib/appTab/StorageUnit.rb
Overview
An enum that contains the Storage Unit to be mentioned in the Bill.
Constant Summary collapse
- KB =
"KB"
- MB =
"MB"
- GB =
"GB"
- TB =
"TB"
Instance Attribute Summary
Attributes inherited from App42Response
#isResponseSuccess, #strResponse, #totalRecords
Instance Method Summary collapse
-
#enum(string) ⇒ Object
Sets the value of the StorageUnit.
-
#isAvailable(string) ⇒ Object
Returns the value of the StorageUnit.
Instance Method Details
#enum(string) ⇒ Object
Sets the value of the StorageUnit.
28 29 30 |
# File 'lib/appTab/StorageUnit.rb', line 28 def enum(string) return StorageUnit.const_get(string) end |
#isAvailable(string) ⇒ Object
Returns the value of the StorageUnit.
38 39 40 41 42 43 44 45 46 47 48 49 50 |
# File 'lib/appTab/StorageUnit.rb', line 38 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 |