Class: App42::AppTab::TimeUnit
- Inherits:
-
App42Response
- Object
- App42Response
- App42::AppTab::TimeUnit
- Defined in:
- lib/appTab/TimeUnit.rb
Overview
An enum that contains the Time Unit to be mentioned in the Bill.
Constant Summary collapse
- SECONDS =
"SECONDS"
- MINUTES =
"MINUTES"
- HOURS =
"HOURS"
Instance Attribute Summary
Attributes inherited from App42Response
#isResponseSuccess, #strResponse, #totalRecords
Instance Method Summary collapse
-
#enum(string) ⇒ Object
Sets the value of the TimeUnit.
-
#isAvailable(string) ⇒ Object
Returns the value of the TimeUnit.
Instance Method Details
#enum(string) ⇒ Object
Sets the value of the TimeUnit.
25 26 27 |
# File 'lib/appTab/TimeUnit.rb', line 25 def enum(string) return TimeUnit.const_get(string) end |
#isAvailable(string) ⇒ Object
Returns the value of the TimeUnit.
35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/appTab/TimeUnit.rb', line 35 def isAvailable(string) if(string == "SECONDS") return "SECONDS" elsif(string == "MINUTES") return "MINUTES" elsif(string == "HOURS") return "HOURS"; else return nil end end |