Module: StrictOptions
- Defined in:
- lib/strict_options.rb
Instance Method Summary collapse
Instance Method Details
#strict_options!(*opts) ⇒ Object
2 3 4 5 6 7 |
# File 'lib/strict_options.rb', line 2 def (*opts) @missings = [] opts.each { |opt| @missings << ":#{opt}" unless @options[opt] } raise ArgumentError, "option#{s} #{@missings.join(', ')} #{is_or_are} missing" if @missings.size > 0 end |