Method: Monotes::SyncList#sync

Defined in:
lib/monotes/sync_list.rb

#syncObject



12
13
14
15
16
17
18
19
# File 'lib/monotes/sync_list.rb', line 12

def sync
  unsynced = @list.find_all {|issue| issue.unsynced? }
  unsynced.map do |issue|
    result = @adapter.create_issue(@repository, issue.title, issue.body)
    yield(result) if block_given?
    Monotes::Models::Issue.new(result.to_hash)
  end
end