Class: Hanami::Mailer::DSL::Attachment Private
- Inherits:
-
Object
- Object
- Hanami::Mailer::DSL::Attachment
- Defined in:
- lib/hanami/mailer/dsl/attachments.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
A class-level attachment definition.
Instance Attribute Summary collapse
- #name_or_filename ⇒ Object readonly private
- #options ⇒ Object readonly private
- #proc ⇒ Object readonly private
Instance Method Summary collapse
- #bind(obj) ⇒ Object private
-
#initialize(name_or_filename, proc = nil, **options) ⇒ Attachment
constructor
private
A new instance of Attachment.
Constructor Details
#initialize(name_or_filename, proc = nil, **options) ⇒ Attachment
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Attachment.
47 48 49 50 51 |
# File 'lib/hanami/mailer/dsl/attachments.rb', line 47 def initialize(name_or_filename, proc = nil, **) @name_or_filename = name_or_filename @proc = proc @options = end |
Instance Attribute Details
#name_or_filename ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
45 46 47 |
# File 'lib/hanami/mailer/dsl/attachments.rb', line 45 def name_or_filename @name_or_filename end |
#options ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
45 46 47 |
# File 'lib/hanami/mailer/dsl/attachments.rb', line 45 def @options end |
#proc ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
45 46 47 |
# File 'lib/hanami/mailer/dsl/attachments.rb', line 45 def proc @proc end |
Instance Method Details
#bind(obj) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
58 59 60 |
# File 'lib/hanami/mailer/dsl/attachments.rb', line 58 def bind(obj) BoundAttachment.new(name_or_filename, proc, obj, **) end |