Here is a simple code in Ruby: def init_options(options) options = { widget: true } end def add_default_config(options) options[:add_on] ||= true end Do not focus on the code design. There might be better ways to express this, but I want here t...
allaboutcoding.ghinda.com8 min read
No responses yet.