Module: ChimpSync
- Defined in:
- lib/chimp_sync.rb
Defined Under Namespace
Classes: List, Subscriber, Update
Class Method Summary
collapse
Class Method Details
.lists ⇒ Object
9
10
11
|
# File 'lib/chimp_sync.rb', line 9
def self.lists
@lists ||= {}
end
|
.lists_for(list_id) ⇒ Object
5
6
7
|
# File 'lib/chimp_sync.rb', line 5
def self.lists_for(list_id)
lists.values.select { |list| list.id == list_id }
end
|
.reset ⇒ Object
13
14
15
|
# File 'lib/chimp_sync.rb', line 13
def self.reset
@lists = {}
end
|
.sync(label, &block) ⇒ Object
17
18
19
|
# File 'lib/chimp_sync.rb', line 17
def self.sync(label, &block)
lists[label] = ChimpSync::List.new.tap { |list| block.call list }
end
|