Class: Mailtrap::Mail::FromTemplate
- Defined in:
- lib/mailtrap/mail/from_template.rb
Instance Attribute Summary collapse
-
#template_uuid ⇒ Object
Returns the value of attribute template_uuid.
-
#template_variables ⇒ Object
Returns the value of attribute template_variables.
Attributes inherited from Base
#attachments, #bcc, #category, #cc, #custom_variables, #from, #headers, #html, #subject, #text, #to
Instance Method Summary collapse
- #as_json ⇒ Object
-
#initialize(from: nil, to: [], cc: [], bcc: [], attachments: [], headers: {}, custom_variables: {}, template_uuid: nil, template_variables: {}) ⇒ FromTemplate
constructor
rubocop:disable Metrics/ParameterLists, Metrics/MethodLength.
Methods inherited from Base
Constructor Details
#initialize(from: nil, to: [], cc: [], bcc: [], attachments: [], headers: {}, custom_variables: {}, template_uuid: nil, template_variables: {}) ⇒ FromTemplate
rubocop:disable Metrics/ParameterLists, Metrics/MethodLength
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/mailtrap/mail/from_template.rb', line 8 def initialize( # rubocop:disable Metrics/ParameterLists, Metrics/MethodLength from: nil, to: [], cc: [], bcc: [], attachments: [], headers: {}, custom_variables: {}, template_uuid: nil, template_variables: {} ) super( from: from, to: to, cc: cc, bcc: bcc, attachments: , headers: headers, custom_variables: custom_variables ) @template_uuid = template_uuid @template_variables = template_variables end |
Instance Attribute Details
#template_uuid ⇒ Object
Returns the value of attribute template_uuid.
6 7 8 |
# File 'lib/mailtrap/mail/from_template.rb', line 6 def template_uuid @template_uuid end |
#template_variables ⇒ Object
Returns the value of attribute template_variables.
6 7 8 |
# File 'lib/mailtrap/mail/from_template.rb', line 6 def template_variables @template_variables end |
Instance Method Details
#as_json ⇒ Object
32 33 34 35 36 37 38 39 |
# File 'lib/mailtrap/mail/from_template.rb', line 32 def as_json super.merge( { 'template_uuid' => template_uuid, 'template_variables' => template_variables } ).compact end |