Class: App42::AppTab::BandwidthUnit
- Inherits:
-
App42Response
- Object
- App42Response
- App42::AppTab::BandwidthUnit
- Defined in:
- lib/appTab/BandwidthUnit.rb
Overview
An enum that contains 4 types of the BandwidthUnit either KB or MB or GB or TB.
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 BandwidthUnit.
-
#isAvailable(string) ⇒ Object
Returns the value of the BandwidthUnit.
Instance Method Details
#enum(string) ⇒ Object
Sets the value of the BandwidthUnit. KB or MB or GB or TB.
31 32 33 |
# File 'lib/appTab/BandwidthUnit.rb', line 31 def enum(string) return BandwidthUnit.const_get(string) end |
#isAvailable(string) ⇒ Object
Returns the value of the BandwidthUnit. KB or MB or GB or TB.
41 42 43 44 45 46 47 48 49 50 51 52 53 |
# 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 |