-
-
Save dpickett/f20e87229a60be2b26a25efd457beb3a to your computer and use it in GitHub Desktop.
This file contains 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
require 'date' | |
class Officiant | |
def authorized? | |
is_minister_of_the_gospel? || willing_to_get_ordained_online? | |
end | |
def available?(date) | |
!not_really_interested && !busy?(date) && !generally_too_busy | |
end | |
def willing_to_officiate_wedding?(groom, bride, date, location) | |
return !busy?(date) && !too_far?(location) && think_should_get_married?(groom, bride) && | |
authorized? && available?(date) | |
end | |
end | |
dan_pickett = Officiant.new | |
location = "Portland, Maine" | |
date = Date.new(2017, 11, 4) # it's a Saturday, ceremony probably around 4PM | |
dan_pickett.willing_to_officiate_wedding?(zach, kyle, date, location) # => true | |
dan_pickett.beyond_humbled_and_honored? # => true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment