Sha256: fc3946d463cd29e0daa73eb9744d132f9786ee05bef3b3b899ce16a4d610e6e3
Contents?: true
Size: 758 Bytes
Versions: 17
Compression:
Stored size: 758 Bytes
Contents
# frozen_string_literal: true module Gemsmith module CLI module Actions # Handles the config action. class Config include Gemsmith::Import[:kernel, :logger] def initialize client: Configuration::Loader::CLIENT, **dependencies super(**dependencies) @client = client end def call selection case selection when :edit then edit when :view then view else logger.error { "Invalid configuration selection: #{selection}." } end end private attr_reader :client def edit = kernel.system("$EDITOR #{client.current}") def view = kernel.system("cat #{client.current}") end end end end
Version data entries
17 entries across 17 versions & 1 rubygems