Class: ChimpContact::Converter

Inherits:
Object
  • Object
show all
Defined in:
lib/chimp_contact/converter.rb

Constant Summary collapse

[
  'Copyright (c) 1996-2011 Constant Contact. All rights reserved.  Except as permitted under a separate',
  'written agreement with Constant Contact, neither the Constant Contact software, nor any content that appears on any Constant Contact site,',
  'including but not limited to, web pages, newsletters, or templates may be reproduced, republished, repurposed, or distributed without the',
  'prior written permission of Constant Contact.  For inquiries regarding reproduction or distribution of any Constant Contact material, please',
  'contact [email protected].'
]

Instance Method Summary collapse

Constructor Details

#initialize(document, options = {}) ⇒ Converter

Returns a new instance of Converter.



12
13
14
15
16
# File 'lib/chimp_contact/converter.rb', line 12

def initialize(document, options = {})
  @document = document
  @params   = options["params"] || {}
  @title    = options["title"]  || "Newsletter"
end

Instance Method Details

#convertObject



18
19
20
21
22
23
24
25
# File 'lib/chimp_contact/converter.rb', line 18

def convert
  strip_mail_chimp_attributes
  insert_copyright
  remove_no_cc
  add_url_parameters
  replace_title
  @document
end