Sha256: 5be5f59e1c965ae7b15c8fa7d1ba301aa2b853034328c4b982e5864114472ae5
Contents?: true
Size: 607 Bytes
Versions: 12
Compression:
Stored size: 607 Bytes
Contents
require_relative 'base_logger' module Locomotive::Wagon class SyncLogger < BaseLogger def initialize subscribe :start do |event| log "\n" log "Syncing #{event.payload[:name].camelcase}", { color: :black, background: :white } end subscribe :writing do |event| log "writing #{event.payload[:label]}", :white, 2, true end subscribe :write_with_success do |event| log ' [' + 'done'.colorize(:green) + ']' end end private def subscribe(action = nil, &block) _subscribe('sync', action, &block) end end end
Version data entries
12 entries across 12 versions & 1 rubygems