Class: AWeber::Resources::List
Constant Summary
collapse
- FOLLOWUP_TYPE_LINK =
File.join(AWeber.api_url, "#followup_campaign")
- BROADCAST_TYPE_LINK =
File.join(AWeber.api_url, "#broadcast_campaign")
Instance Method Summary
collapse
#<=>, alias_attribute, api_attr, #delete, has_many, has_one, #save, #writable_attrs
Constructor Details
#initialize(*args) ⇒ List
Returns a new instance of List.
18
19
20
21
22
23
|
# File 'lib/aweber/resources/list.rb', line 18
def initialize(*args)
super(*args)
@campaigns = {}
@followups = nil
@broadcasts = nil
end
|
Instance Method Details
#broadcasts ⇒ Object
33
34
35
36
|
# File 'lib/aweber/resources/list.rb', line 33
def broadcasts
campaigns if @broadcasts.nil?
@broadcasts
end
|
#campaigns ⇒ Object
25
26
27
28
29
30
31
|
# File 'lib/aweber/resources/list.rb', line 25
def campaigns
return @campaigns unless @campaigns == {}
create_followups
create_broadcasts
populate_campaigns
@campaigns
end
|
#followups ⇒ Object
38
39
40
41
|
# File 'lib/aweber/resources/list.rb', line 38
def followups
campaigns if @followups.nil?
@followups
end
|