Class: Filetypes
- Inherits:
-
Object
- Object
- Filetypes
- 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
-
#documents ⇒ Object
readonly
Returns the value of attribute documents.
-
#pictures ⇒ Object
readonly
Returns the value of attribute pictures.
-
#videos ⇒ Object
readonly
Returns the value of attribute videos.
Instance Method Summary collapse
-
#initialize ⇒ Filetypes
constructor
A new instance of Filetypes.
Constructor Details
#initialize ⇒ Filetypes
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
#documents ⇒ Object (readonly)
Returns the value of attribute documents.
89 90 91 |
# File 'lib/bombay.rb', line 89 def documents @documents end |
#pictures ⇒ Object (readonly)
Returns the value of attribute pictures.
89 90 91 |
# File 'lib/bombay.rb', line 89 def pictures @pictures end |
#videos ⇒ Object (readonly)
Returns the value of attribute videos.
89 90 91 |
# File 'lib/bombay.rb', line 89 def videos @videos end |