Class: Hubspot::Mailer::HubspotPreviewInterceptor

Inherits:
Object
  • Object
show all
Defined in:
lib/hubspot/mailer/hubspot_preview_interceptor.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message) ⇒ HubspotPreviewInterceptor

Returns a new instance of HubspotPreviewInterceptor.



12
13
14
# File 'lib/hubspot/mailer/hubspot_preview_interceptor.rb', line 12

def initialize(message)
  @message = message
end

Instance Attribute Details

#messageObject (readonly)

Returns the value of attribute message.



10
11
12
# File 'lib/hubspot/mailer/hubspot_preview_interceptor.rb', line 10

def message
  @message
end

Class Method Details

.previewing_email(message) ⇒ Object



5
6
7
# File 'lib/hubspot/mailer/hubspot_preview_interceptor.rb', line 5

def previewing_email(message)
  new(message).transform!
end

Instance Method Details

#transform!Object



16
17
18
# File 'lib/hubspot/mailer/hubspot_preview_interceptor.rb', line 16

def transform!
  build_preview
end