Last active
July 26, 2019 12:42
-
-
Save nafidurmus/d58f3979eab648458e6daf2495a00263 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
class EventDirector | |
def initialize | |
@subevents = [:welcome, :intermediary,:closing] | |
end | |
def organize event | |
@subevents.each { |se| event.send(se) if event.respond_to? se } | |
end | |
end | |
class Wedding | |
def welcome | |
puts 'give welcome drink' | |
end | |
def intermediary | |
puts 'Exchange of vows,Exchange of rings' | |
end | |
def closing | |
puts 'closing prayer' | |
end | |
end | |
class TeamParty | |
def welcome | |
puts 'give complementry mocktail or beer :)' | |
end | |
def intermediary | |
puts 'Team building activities' | |
end | |
def closing | |
puts 'team photo' | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment