Sha256: dc0fe8a530a3fc855e9a45247730ea6644154e4386dcc676e6b71f98a827043c
Contents?: true
Size: 466 Bytes
Versions: 6
Compression:
Stored size: 466 Bytes
Contents
require 'zaru' module Template class RequiredFile attr_accessor :name, :directory # :default_value, :type, :bool_strings attr_accessor :comment # , :validation, :validation_hint def initialize(name) raise 'File name required' unless name.length > 0 raise "Invalid characters found in file name (try #{Zaru.sanitize!(name)})" unless Zaru.sanitize!(name) == name self.name = name if name self.directory = '.' end end end
Version data entries
6 entries across 6 versions & 1 rubygems