Sha256: 741b6855dbddf3afd6d885822f89388bd13ce2fbd8218436ba02d348b665698c
Contents?: true
Size: 470 Bytes
Versions: 11
Compression:
Stored size: 470 Bytes
Contents
class ERB::Formatter::IgnoreList def initialize(contents: nil, base_dir: Dir.pwd) ignore_list_path = "#{base_dir}/.format-erb-ignore" @contents = contents || (File.exist?(ignore_list_path) ? File.read(ignore_list_path) : '') @ignore_list = @contents.lines end def should_ignore_file?(path) path = File.expand_path(path, @base_dir) @ignore_list.any? do |line| File.fnmatch? File.expand_path(line.chomp, @base_dir), path end end end
Version data entries
11 entries across 11 versions & 1 rubygems