Method: CleanUp::OptionValues#method_missing
- Defined in:
- lib/clean_up/option_values.rb
#method_missing(method, *args, &block) ⇒ Object
21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/clean_up/option_values.rb', line 21 def method_missing(method, *args, &block) if SUPPORTED_BLOCK_OPTIONS.include?(method.to_s) @options[method.to_s] = block elsif SUPPORTED_OPTIONS.include?(method.to_s) case method when 'dir' @options[method.to_s] = args.first.end_with?('/') ? args.first : "#{args.first}/" else @options[method.to_s] = args end end end |