Skip to content

Instantly share code, notes, and snippets.

@poppen
Created July 16, 2014 09:16
Show Gist options
  • Save poppen/aa15b44b99661af0277f to your computer and use it in GitHub Desktop.
Save poppen/aa15b44b99661af0277f to your computer and use it in GitHub Desktop.
class Person
def has_holiday_in?(year, month)
calendar = new Calendar(year, month)
calendar.has_holiday? ? true : false
end
end
class Person
def has_holiday_in?(calendar)
calendar.has_holiday? ? true : false
end
end
class Person
def initialize(calendar)
@calendar = calendar
end
def has_holiday?
@calendar.has_holiday? ? true : false
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment