Class: ElFinder2::Configuration
- Inherits:
-
Object
- Object
- ElFinder2::Configuration
- Defined in:
- lib/el_finder2.rb
Instance Attribute Summary collapse
-
#default_options ⇒ Object
Returns the value of attribute default_options.
-
#document_options ⇒ Object
Returns the value of attribute document_options.
-
#document_validations ⇒ Object
Returns the value of attribute document_validations.
-
#image_options ⇒ Object
Returns the value of attribute image_options.
-
#image_validations ⇒ Object
Returns the value of attribute image_validations.
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.
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/el_finder2.rb', line 26 def initialize @document_validations = { presence: true, file_type_ignorance: {} } @image_validations = { presence: true, content_type: { content_type: ElFinder2::IMAGE_MIME_REGEX } } @default_options = {} @image_options = { styles: { thumb: '100x100>' } } @document_options = {} end |
Instance Attribute Details
#default_options ⇒ Object
Returns the value of attribute default_options.
24 25 26 |
# File 'lib/el_finder2.rb', line 24 def @default_options end |
#document_options ⇒ Object
Returns the value of attribute document_options.
22 23 24 |
# File 'lib/el_finder2.rb', line 22 def @document_options end |
#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_options ⇒ Object
Returns the value of attribute image_options.
23 24 25 |
# File 'lib/el_finder2.rb', line 23 def @image_options end |
#image_validations ⇒ Object
Returns the value of attribute image_validations.
21 22 23 |
# File 'lib/el_finder2.rb', line 21 def image_validations @image_validations end |
Instance Method Details
#document_attachment ⇒ Object
47 48 49 |
# File 'lib/el_finder2.rb', line 47 def @default_options.merge(@document_options) end |
#image_attachment ⇒ Object
43 44 45 |
# File 'lib/el_finder2.rb', line 43 def @default_options.merge(@image_options) end |