Module: GollumRails::Upload::ClassDefinitions::ClassMethods
- Defined in:
- lib/gollum_rails/upload/class_definitions.rb
Instance Attribute Summary collapse
-
#blacklist ⇒ Object
Returns the value of attribute blacklist.
-
#destination ⇒ Object
Returns the value of attribute destination.
-
#overwrite ⇒ Object
Returns the value of attribute overwrite.
-
#whitelist ⇒ Object
Returns the value of attribute whitelist.
Instance Method Summary collapse
- #blacklist_format(*formats) ⇒ Object
- #max_filesize(size) ⇒ Object
- #max_size ⇒ Object
- #overwrite_existing_files(bool) ⇒ Object
- #upload_directory(dir) ⇒ Object
- #whitelist_format(*formats) ⇒ Object
Instance Attribute Details
#blacklist ⇒ Object
Returns the value of attribute blacklist.
10 11 12 |
# File 'lib/gollum_rails/upload/class_definitions.rb', line 10 def blacklist @blacklist end |
#destination ⇒ Object
Returns the value of attribute destination.
8 9 10 |
# File 'lib/gollum_rails/upload/class_definitions.rb', line 8 def destination @destination end |
#overwrite ⇒ Object
Returns the value of attribute overwrite.
9 10 11 |
# File 'lib/gollum_rails/upload/class_definitions.rb', line 9 def overwrite @overwrite end |
#whitelist ⇒ Object
Returns the value of attribute whitelist.
11 12 13 |
# File 'lib/gollum_rails/upload/class_definitions.rb', line 11 def whitelist @whitelist end |
Instance Method Details
#blacklist_format(*formats) ⇒ Object
12 13 14 15 |
# File 'lib/gollum_rails/upload/class_definitions.rb', line 12 def blacklist_format(*formats) self.blacklist ||= [] self.blacklist += Array(formats) end |
#max_filesize(size) ⇒ Object
20 21 22 |
# File 'lib/gollum_rails/upload/class_definitions.rb', line 20 def max_filesize(size) @max_size=size if size end |
#max_size ⇒ Object
23 24 25 |
# File 'lib/gollum_rails/upload/class_definitions.rb', line 23 def max_size @max_size end |
#overwrite_existing_files(bool) ⇒ Object
29 30 31 |
# File 'lib/gollum_rails/upload/class_definitions.rb', line 29 def overwrite_existing_files(bool) self.overwrite = bool end |
#upload_directory(dir) ⇒ Object
26 27 28 |
# File 'lib/gollum_rails/upload/class_definitions.rb', line 26 def upload_directory(dir) self.destination = dir end |
#whitelist_format(*formats) ⇒ Object
16 17 18 19 |
# File 'lib/gollum_rails/upload/class_definitions.rb', line 16 def whitelist_format(*formats) self.whitelist ||= [] self.whitelist += Array(formats) end |