Module: ImportableAttachments::Base::InstanceMethods
- Defined in:
- lib/importable_attachments/base.rb
Instance Method Summary collapse
-
#import_attachment ⇒ Object
: call-seq: import_attachment.
-
#import_rows(*opts) ⇒ Object
: call-seq: import_rows params.
- #invalid_attachment_error(msg) ⇒ Object
Instance Method Details
#import_attachment ⇒ Object
: call-seq: import_attachment
imports an attachment of a given mime-type (data-stream to ruby), calls import_rows with a ruby data-store
NOTE: this is a stub
86 87 88 |
# File 'lib/importable_attachments/base.rb', line 86 def raise RuntimeError, '[importable_attachments] .import_attachment not implemented' end |
#import_rows(*opts) ⇒ Object
: call-seq: import_rows params
imports an attachment contents into :import_into association
NOTE: this is a stub
97 98 99 100 101 |
# File 'lib/importable_attachments/base.rb', line 97 def import_rows(*opts) return unless self. logger.debug "[importable_attachments] .import_rows #{opts}" raise RuntimeError, '[importable_attachments] .import_rows not implemented' end |
#invalid_attachment_error(msg) ⇒ Object
103 104 105 106 |
# File 'lib/importable_attachments/base.rb', line 103 def (msg) .errors.add(:base, msg) errors.add(:attachment, 'invalid attachment') end |