Module: Jung::Drivers::Mailchimp

Defined in:
lib/jung/drivers/mailchimp.rb

Defined Under Namespace

Modules: Campaign, List Classes: Api

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#apiObject

Returns the value of attribute api.



7
8
9
# File 'lib/jung/drivers/mailchimp.rb', line 7

def api
  @api
end

#gbObject

Returns the value of attribute gb.



7
8
9
# File 'lib/jung/drivers/mailchimp.rb', line 7

def gb
  @gb
end

#idObject (readonly)

Returns the value of attribute id.



7
8
9
# File 'lib/jung/drivers/mailchimp.rb', line 7

def id
  @id
end

#list_idObject

Returns the value of attribute list_id.



7
8
9
# File 'lib/jung/drivers/mailchimp.rb', line 7

def list_id
  @list_id
end

Class Method Details

.extended(base) ⇒ Object



10
11
12
13
14
15
16
# File 'lib/jung/drivers/mailchimp.rb', line 10

def self.extended(base)
  base.extend Jung::Drivers::Mailchimp::List
  base.extend Jung::Drivers::Mailchimp::Campaign if base.class == Jung::Campaign

  base.list_id = base.config.options[:list_id]
  base.api = Api.new base.config
end

Instance Method Details

#errorsObject



18
19
20
# File 'lib/jung/drivers/mailchimp.rb', line 18

def errors
  api.errors
end