Class: Filetypes

Inherits:
Object
  • Object
show all
Defined in:
lib/bombay.rb

Overview

Defines the regular expressions used by bombay to determine which folder a particular file belongs to.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeFiletypes

Returns a new instance of Filetypes.



91
92
93
94
95
# File 'lib/bombay.rb', line 91

def initialize
  @pictures = /\.(ico|svg|png|jpe?g|webp|avif)$/
  @videos = /\.(gif|mp4|weba|mpeg)$/
  @documents = /\.(pdf|epub|xml|txt|x?html|pptx?|docx?|rtf|md|org)$/
end

Instance Attribute Details

#documentsObject (readonly)

Returns the value of attribute documents.



89
90
91
# File 'lib/bombay.rb', line 89

def documents
  @documents
end

#picturesObject (readonly)

Returns the value of attribute pictures.



89
90
91
# File 'lib/bombay.rb', line 89

def pictures
  @pictures
end

#videosObject (readonly)

Returns the value of attribute videos.



89
90
91
# File 'lib/bombay.rb', line 89

def videos
  @videos
end