Class: SipoMailer::Mailer::Response

Inherits:
Object
  • Object
show all
Defined in:
lib/sipo_mailer/email.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(response = nil) ⇒ Response

Returns a new instance of Response.



8
9
10
# File 'lib/sipo_mailer/email.rb', line 8

def initialize(response = nil)
  @response = response
end

Instance Attribute Details

#responseObject (readonly)

Returns the value of attribute response.



7
8
9
# File 'lib/sipo_mailer/email.rb', line 7

def response
  @response
end

Instance Method Details

#sent?Boolean

Returns:

  • (Boolean)


12
13
14
15
16
17
18
# File 'lib/sipo_mailer/email.rb', line 12

def sent?
  if @response.is_a? Mail::Message
    @response&.errors.empty?
  else
    false
  end
end