Sha256: 73610a774d367e91c01fc3af07772947a53796fa0e864c6506bcef87d0763b3d

Contents?: true

Size: 492 Bytes

Versions: 2

Compression:

Stored size: 492 Bytes

Contents

# frozen_string_literal: true

module SublimeTextKit
  module Snippets
    # Prints snippets as a list.
    class Printer
      include Import[:logger]

      def initialize(collector: Collector.new, **)
        super(**)
        @collector = collector
      end

      def call bullet
        collector.call.each do |snippet|
          logger.info "#{bullet} #{snippet.description} - `#{snippet.trigger}`"
        end
      end

      private

      attr_reader :collector
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
sublime_text_kit-14.1.2 lib/sublime_text_kit/snippets/printer.rb
sublime_text_kit-14.1.1 lib/sublime_text_kit/snippets/printer.rb