Created
September 21, 2012 10:23
-
-
Save mikebaldry/3760790 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
| def is_votable? | |
| return false unless active | |
| running? | |
| end | |
| def time_boxed? | |
| starting_at.nil? && ending_at.nil? | |
| end | |
| def running? | |
| return true if time_boxed? | |
| Time.now > starting_at && Time.now < ending_at | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment