Class: PersistentAttachments::VAForm
- Inherits:
-
PersistentAttachment
- Object
- PersistentAttachment
- PersistentAttachments::VAForm
- Defined in:
- app/models/persistent_attachments/va_form.rb
Constant Summary collapse
- CONFIGS =
Hash.new( { max_pages: 10, min_pages: 1 } ).merge( { '21-0779' => { max_pages: 4, min_pages: 2 } } )
Instance Method Summary collapse
- #as_json(options = {}) ⇒ Object
- #delete_file ⇒ Object private
- #max_pages ⇒ Object
- #min_pages ⇒ Object
- #warnings ⇒ Object
Instance Method Details
#as_json(options = {}) ⇒ Object
28 29 30 |
# File 'app/models/persistent_attachments/va_form.rb', line 28 def as_json( = {}) super().merge(warnings:) end |
#delete_file ⇒ Object (private)
34 35 36 |
# File 'app/models/persistent_attachments/va_form.rb', line 34 def delete_file file.delete end |
#max_pages ⇒ Object
16 17 18 |
# File 'app/models/persistent_attachments/va_form.rb', line 16 def max_pages CONFIGS[form_id][:max_pages] end |
#min_pages ⇒ Object
20 21 22 |
# File 'app/models/persistent_attachments/va_form.rb', line 20 def min_pages CONFIGS[form_id][:min_pages] end |
#warnings ⇒ Object
24 25 26 |
# File 'app/models/persistent_attachments/va_form.rb', line 24 def warnings @warnings ||= [] end |