Sha256: 9bbba46cc2c9a77b4511962508a155765da7e19bcb81f07ada178306223561c2
Contents?: true
Size: 917 Bytes
Versions: 1
Compression:
Stored size: 917 Bytes
Contents
module Troo module Commands class RefreshAll def self.dispatch new.refresh_all end def refresh_all return success if refreshed? failure end private def success 'All local data refreshed.' end def failure 'Cannot refresh all local data.' end def refreshed? return false if resources.none? Troo::Refresh.completed! true end def resources @resources ||= external_ids.map do |id| Retrieval::Remote.fetch(Remote::Board, id, mode: :board) end end def external_ids all_boards.map(&:id) end def all_boards @boards ||= Retrieval::Remote .fetch(Remote::Board, nil, options) end def options { mode: :all, persist: false } end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
troo-0.0.9 | lib/troo/cli/commands/refresh/all.rb |