Class: ElFinder2::Configuration
- Inherits:
-
Object
- Object
- ElFinder2::Configuration
- Defined in:
- lib/el_finder2.rb
Instance Attribute Summary collapse
-
#document_validations ⇒ Object
Returns the value of attribute document_validations.
-
#image_styles ⇒ Object
Returns the value of attribute image_styles.
-
#image_validations ⇒ Object
Returns the value of attribute image_validations.
-
#paperclip_defaults ⇒ Object
Returns the value of attribute paperclip_defaults.
Instance Method Summary collapse
- #document_attachment ⇒ Object
- #image_attachment ⇒ Object
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/el_finder2.rb', line 25 def initialize @document_validations = { presence: true, file_type_ignorance: {} } @image_styles = { thumb: '100x100>' } @image_validations = { presence: true, content_type: { content_type: ElFinder2::IMAGE_MIME_REGEX } } @paperclip_defaults = {} end |
Instance Attribute Details
#document_validations ⇒ Object
Returns the value of attribute document_validations.
20 21 22 |
# File 'lib/el_finder2.rb', line 20 def document_validations @document_validations end |
#image_styles ⇒ Object
Returns the value of attribute image_styles.
21 22 23 |
# File 'lib/el_finder2.rb', line 21 def image_styles @image_styles end |
#image_validations ⇒ Object
Returns the value of attribute image_validations.
22 23 24 |
# File 'lib/el_finder2.rb', line 22 def image_validations @image_validations end |
#paperclip_defaults ⇒ Object
Returns the value of attribute paperclip_defaults.
23 24 25 |
# File 'lib/el_finder2.rb', line 23 def paperclip_defaults @paperclip_defaults end |
Instance Method Details
#document_attachment ⇒ Object
42 43 44 |
# File 'lib/el_finder2.rb', line 42 def @paperclip_defaults end |
#image_attachment ⇒ Object
38 39 40 |
# File 'lib/el_finder2.rb', line 38 def @paperclip_defaults.merge(styles: @image_styles) end |