Sha256: a7eb90de50d43870e519563022079c14066f0f125fb3921bb63f183aad1e4de3
Contents?: true
Size: 405 Bytes
Versions: 25
Compression:
Stored size: 405 Bytes
Contents
class ExtensionFilter def initialize(file_class, extension) @file_class = file_class @extension = extension.downcase end def filter(file_name) return file_type(file_name) == @extension end # Return the part of the file name string after the last '.' def file_type(file_name) @file_class.extname(file_name).gsub( /^\./, '' ).downcase end def complete end end
Version data entries
25 entries across 25 versions & 2 rubygems