- user_builder = lambda do |first_name, last_name, *options|
- # options = [{first_name_only: true, other_random_option: false}]
- if !options.empty? && options.first[:first_name_only]
- return first_name.capitalize
- else
- return first_name.capitalize + ' ' + last_name.capitalize
- end
- end
- puts user_builder.call("Dan", "DeMeyere", :first_name_only => true, :other_random_option => false) # => outputs Dan