Module: ChimpContact

Extended by:
ChimpContact
Included in:
ChimpContact
Defined in:
lib/chimp_contact.rb,
lib/chimp_contact/version.rb,
lib/chimp_contact/template.rb,
lib/chimp_contact/converter.rb,
lib/chimp_contact/dashboard.rb,
lib/chimp_contact/configuration.rb

Defined Under Namespace

Classes: Configuration, Converter, Dashboard, MailChimpError, Template

Constant Summary collapse

VERSION =
"0.0.4"

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#configurationObject

Returns the value of attribute configuration.



11
12
13
# File 'lib/chimp_contact.rb', line 11

def configuration
  @configuration
end

Instance Method Details

#configure {|configuration| ... } ⇒ Object

Call this method to modify defaults in your initializers.

Examples:

ChimpContact.configure do |config|
  config.mailchimp_api_key = 'akueoq3royowyvrowy5o3coq3yr-us2'
end

Yields:



25
26
27
28
# File 'lib/chimp_contact.rb', line 25

def configure
  self.configuration ||= Configuration.new
  yield(configuration)
end

#hominidObject

Returns the current Hominid Mailchimp API connection. If none has been created, will create a new one.



15
16
17
# File 'lib/chimp_contact.rb', line 15

def hominid
  @hominid ||= Hominid::API.new(configuration.mailchimp_api_key)
end