Sha256: 799cd2cefbd89cd71d54d1f86b0f385e8995e7605ed174550469b0077352523e
Contents?: true
Size: 478 Bytes
Versions: 93
Compression:
Stored size: 478 Bytes
Contents
module Origen module CommandHelpers def self.extend_options(opts, app_opts, options) app_opts.each do |app_option| if app_option.last.is_a?(Proc) ao_proc = app_option.pop if ao_proc.arity == 1 opts.on(*app_option) { ao_proc.call(options) } else opts.on(*app_option) { |arg| ao_proc.call(options, arg) } end else opts.on(*app_option) {} end end end end end
Version data entries
93 entries across 93 versions & 1 rubygems