class App42::AppTab::TimeUnit

An enum that contains the Time Unit to be mentioned in the Bill.

Constants

HOURS
MINUTES
SECONDS

Public Instance Methods

enum(string) click to toggle source

Sets the value of the TimeUnit.

@param string

- the string of TimeUnit
# File lib/appTab/TimeUnit.rb, line 25
def enum(string)
  return TimeUnit.const_get(string)
end
isAvailable(string) click to toggle source

Returns the value of the TimeUnit.

@return the value of TimeUnit.

# 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