Sha256: 9fbe55e1427af399465381a4e9e3e6afa13a4af3b1834168ac7701c63a9c25fc
Contents?: true
Size: 391 Bytes
Versions: 14
Compression:
Stored size: 391 Bytes
Contents
# frozen_string_literal: true 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