Created
September 14, 2009 20:03
-
-
Save Hates/186893 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module States | |
CANCELLED = "cancelled" | |
DECLINED = "declined" | |
PASSIVE = "passive" | |
ACTIVE = "active" | |
APPROVED = "approved" | |
PENDING = "pending" | |
FLAGGED = "flagged" | |
COMPLETE = "complete" | |
def cancelled? | |
self.state == CANCELLED | |
end | |
def declined? | |
self.state == DECLINED | |
end | |
def passive? | |
self.state == PASSIVE | |
end | |
def active? | |
self.state == ACTIVE | |
end | |
def approved? | |
self.state == APPROVED | |
end | |
def pending? | |
self.state == PENDING | |
end | |
def flagged? | |
self.state == FLAGGED | |
end | |
def complete? | |
self.state == COMPLETE | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment