Sha256: 1a5cc9d3fb081e401ea24a5219551c8bf7a127bfec016c66660b0c274bbbca46

Contents?: true

Size: 515 Bytes

Versions: 9

Compression:

Stored size: 515 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, **dependencies
        super(**dependencies)
        @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

9 entries across 9 versions & 1 rubygems

Version Path
sublime_text_kit-14.1.0 lib/sublime_text_kit/snippets/printer.rb
sublime_text_kit-14.0.0 lib/sublime_text_kit/snippets/printer.rb
sublime_text_kit-13.5.0 lib/sublime_text_kit/snippets/printer.rb
sublime_text_kit-13.4.0 lib/sublime_text_kit/snippets/printer.rb
sublime_text_kit-13.3.0 lib/sublime_text_kit/snippets/printer.rb
sublime_text_kit-13.2.0 lib/sublime_text_kit/snippets/printer.rb
sublime_text_kit-13.1.0 lib/sublime_text_kit/snippets/printer.rb
sublime_text_kit-13.0.1 lib/sublime_text_kit/snippets/printer.rb
sublime_text_kit-13.0.0 lib/sublime_text_kit/snippets/printer.rb