Class: Optout::Dir

Inherits:
File
  • Object
show all
Defined in:
lib/optout.rb

Overview

Optout::Dir is a validaton rule that can be used to check that an option’s value is a path to a directory. This class proivdes the same functionality for directories that Optout::File provides for files. See Optout::File for more info.

Validation rules can be combined:

Optout.options do 
  on :path, "--path", Optout::Dir.exists.under("/tmp").named(/\d$/)
end

See Optout::File for a list of methods.

Class Method Summary collapse

Methods inherited from File

exists

Class Method Details

.proxy_forObject

:nodoc:



757
758
759
# File 'lib/optout.rb', line 757

def self.proxy_for #:nodoc:
  Validator::Dir
end