Class: NeonEmail::Operations::GreetingMailer
- Inherits:
-
NeonOperations::Operation
- Object
- NeonOperations::Operation
- NeonEmail::Operations::GreetingMailer
- Defined in:
- lib/neon_email/operations/greeting_mailer.rb
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(input:, schema_contract: NeonSchemas::Contracts::OutboundEmails::WelcomeEmailContract, mailer_operation: NeonEmail::Operations::SendgridMailer) ⇒ GreetingMailer
constructor
A new instance of GreetingMailer.
Constructor Details
#initialize(input:, schema_contract: NeonSchemas::Contracts::OutboundEmails::WelcomeEmailContract, mailer_operation: NeonEmail::Operations::SendgridMailer) ⇒ GreetingMailer
Returns a new instance of GreetingMailer.
6 7 8 9 10 11 12 13 14 |
# File 'lib/neon_email/operations/greeting_mailer.rb', line 6 def initialize( input:, schema_contract: NeonSchemas::Contracts::OutboundEmails::WelcomeEmailContract, mailer_operation: NeonEmail::Operations::SendgridMailer ) @input = input @schema_contract = schema_contract @mailer_operation = mailer_operation end |
Instance Method Details
#call ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/neon_email/operations/greeting_mailer.rb', line 16 def call validate_input.bind do |validated_input| mailer_operation.call( input: { from: "[email protected]", to: validated_input[:email], subject: "Welcome to Neon Law!", content: "Welcome, please email us if you have any questions." } ) end end |