Sha256: efb8eead80a9d9d452e4ffea2e3df777f054097fb6da08e95f17b3418599e6cb
Contents?: true
Size: 736 Bytes
Versions: 6
Compression:
Stored size: 736 Bytes
Contents
# frozen_string_literal: true module Rubysmith module CLI module Actions # Handles the config action. class Config include Rubysmith::Import[:kernel, :logger] def initialize(client: Configuration::Loader::CLIENT, **) super(**) @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
6 entries across 6 versions & 1 rubygems