Sha256: 43492efd25caaccb63d01c734011682c857a9c448ff9fdea56ffbe13dde00099

Contents?: true

Size: 492 Bytes

Versions: 13

Compression:

Stored size: 492 Bytes

Contents

# frozen_string_literal: true

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

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

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

      private

      attr_reader :collector
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
sublime_text_kit-16.5.0 lib/sublime_text_kit/snippets/printer.rb
sublime_text_kit-16.3.0 lib/sublime_text_kit/snippets/printer.rb
sublime_text_kit-16.2.0 lib/sublime_text_kit/snippets/printer.rb
sublime_text_kit-16.1.0 lib/sublime_text_kit/snippets/printer.rb
sublime_text_kit-16.0.0 lib/sublime_text_kit/snippets/printer.rb
sublime_text_kit-15.2.1 lib/sublime_text_kit/snippets/printer.rb
sublime_text_kit-15.2.0 lib/sublime_text_kit/snippets/printer.rb
sublime_text_kit-15.1.0 lib/sublime_text_kit/snippets/printer.rb
sublime_text_kit-15.0.3 lib/sublime_text_kit/snippets/printer.rb
sublime_text_kit-15.0.2 lib/sublime_text_kit/snippets/printer.rb
sublime_text_kit-15.0.1 lib/sublime_text_kit/snippets/printer.rb
sublime_text_kit-15.0.0 lib/sublime_text_kit/snippets/printer.rb
sublime_text_kit-14.2.0 lib/sublime_text_kit/snippets/printer.rb