Last active
October 4, 2017 15:34
-
-
Save paulopatto/f151f1e4e6d687c9f662a6c1e324194f 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
# http://bit.ly/2xf8pEv | |
def meditate(cushion, meditation = 'kinhin', *room_itens, time: , posture: 'kekkafuza', **periods, &block) | |
puts "=====================================" | |
puts "We are praticing #{meditation}, for #{time} minutes, in the #{posture} posture (ouch, my knees!)." | |
puts "Room item: #{room_itens}" | |
puts "Periods: #{periods}" | |
puts "=====================================" | |
block.call | |
end | |
meditate('zafu', # cushion | |
'zazen', # meditation | |
'zabuston', # room_item | |
'incense', # room_item | |
time: 40, # keyword argument | |
# Omitted the posture optional keyword argument; | |
period1: 'morning', # Passed a couple of extra keyword arguments (period1: "morning", period2: "afternoon") through the **periods parameter; | |
period2: 'afternom') { puts "\n\tHello from inside the block" } | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment