Method: Rake::FileUtilsExt#rake_check_options
- Defined in:
- lib/rake/file_utils_ext.rb
#rake_check_options(options, *optdecl) ⇒ Object
Check that the options do not contain options not listed in optdecl. An ArgumentError exception is thrown if non-declared options are found.
123 124 125 126 127 128 129 130 |
# File 'lib/rake/file_utils_ext.rb', line 123 def (, *optdecl) h = .dup optdecl.each do |name| h.delete name end raise ArgumentError, "no such option: #{h.keys.join(' ')}" unless h.empty? end |