Sha256: 8407fd3256ee0d29a816a542f9236fa709310aeddd8864b57dbf704004f13fc1
Contents?: true
Size: 360 Bytes
Versions: 14
Compression:
Stored size: 360 Bytes
Contents
module OptParseValidator # Implemetantion of the DirectoryPath Option class OptDirectoryPath < OptPath def initialize(option, attrs = {}) super(option, attrs) @attrs.merge!(directory: true) end # @param [ Pathname ] path def check_create(path) FileUtils.mkdir_p(path.to_s) unless Dir.exist?(path.to_s) end end end
Version data entries
14 entries across 14 versions & 1 rubygems