Sha256: e9ffe67b4875ce52340263f40fac942d0a3ea0d5e8438b846eb4533d78122759
Contents?: true
Size: 702 Bytes
Versions: 9
Compression:
Stored size: 702 Bytes
Contents
# frozen_string_literal: true module SublimeTextKit module CLI module Actions # Handles snippets action. class Snippets include SublimeTextKit::Import[:configuration, :logger] def initialize printer: SublimeTextKit::Snippets::Printer.new, **dependencies super(**dependencies) @printer = printer end def call kind case kind when :ascii_doc then printer.call "*" when :markdown then printer.call "-" else logger.error { "Invalid snippet format: #{kind}. Use ascii_doc or markdown." } end end private attr_reader :printer end end end end
Version data entries
9 entries across 9 versions & 1 rubygems