class IDL::OptionList::Option::Group::ParamSet::Configurator
Public Class Methods
new(set)
click to toggle source
# File lib/ridl/optparse_ext.rb, line 54 def initialize(set) @set = set end
Public Instance Methods
on_exec(&block)
click to toggle source
# File lib/ridl/optparse_ext.rb, line 58 def on_exec(&block) ext_klass = class << @set; self; end ext_klass.send(:define_method, :_exec, &block) ext_klass.send(:protected, :_exec) end
with(param, options = {})
click to toggle source
# File lib/ridl/optparse_ext.rb, line 64 def with(param, options = {}) @set.define_params({param => options}) end
without(*params)
click to toggle source
# File lib/ridl/optparse_ext.rb, line 68 def without(*params) params.each { |p| @set.params.delete(p.to_sym) } end