Skip to content

Instantly share code, notes, and snippets.

@mklemme
Created January 11, 2015 02:23
Show Gist options
  • Save mklemme/46a72e12b334c9db2da3 to your computer and use it in GitHub Desktop.
Save mklemme/46a72e12b334c9db2da3 to your computer and use it in GitHub Desktop.
# 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