Class: Teems::Commands::Sync
- Includes:
- SyncAuth, SyncChatHandler, SyncDisplay
- Defined in:
- lib/teems/commands/sync.rb
Overview
Sync chat history locally as Markdown + JSON files
Constant Summary collapse
- DEFAULT_SINCE_DAYS =
180- SKIP_PREFIXES =
%w[48:].freeze
Constants included from SyncChatHandler
Teems::Commands::SyncChatHandler::RETRY_DELAY_SECONDS
Instance Attribute Summary
Attributes inherited from Base
#options, #positional_args, #runner
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(args, runner:) ⇒ Sync
constructor
A new instance of Sync.
- #validate_and_authenticate ⇒ Object
Constructor Details
#initialize(args, runner:) ⇒ Sync
Returns a new instance of Sync.
296 297 298 299 300 301 302 |
# File 'lib/teems/commands/sync.rb', line 296 def initialize(args, runner:) @options = {} @sync_store = nil @state = nil @stats = nil super end |
Instance Method Details
#execute ⇒ Object
304 305 306 307 308 309 |
# File 'lib/teems/commands/sync.rb', line 304 def execute result = validate_and_authenticate return result if result run_sync end |
#validate_and_authenticate ⇒ Object
311 312 313 |
# File 'lib/teems/commands/sync.rb', line 311 def validate_and_authenticate || login_if_requested || require_auth end |