Created
January 11, 2015 02:23
-
-
Save mklemme/46a72e12b334c9db2da3 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
# gem install pry - form terminal | |
# ruby file_name.rb | |
require 'pry' | |
def hello(*args) | |
# reset base to inside the array | |
arg_base = args[0] | |
# setting up the parameters | |
message = arg_base[:message] if arg_base[:message] != nil | |
header = arg_base[:header] if arg_base[:header] != nil | |
category = arg_base[:category] if arg_base[:category] != nil | |
# testing output | |
p message | |
p category | |
p header | |
# bind the ruby all up in hur | |
binding.pry | |
end | |
# initializer | |
hello(message: "Welcome {user.name}!", category: ["welcome", "Myk"]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment