lib/gemsmith/templates/%project_name%/lib/%project_path%/cli/actions/config.rb.erb in gemsmith-17.0.1 vs lib/gemsmith/templates/%project_name%/lib/%project_path%/cli/actions/config.rb.erb in gemsmith-18.0.0

- old
+ new

@@ -1,15 +1,16 @@ -# frozen_string_literal: true - <% namespace do %> module CLI module Actions # Handles the config action. class Config - def initialize client: Configuration::Loader::CLIENT, container: Container + include <%= configuration.project_class %>::Import[:kernel, :logger] + + def initialize client: Configuration::Loader::CLIENT, **dependencies + super(**dependencies) + @client = client - @container = container end def call selection case selection when :edit then edit @@ -18,18 +19,14 @@ end end private - attr_reader :client, :container + attr_reader :client def edit = kernel.system("$EDITOR #{client.current}") def view = kernel.system("cat #{client.current}") - - def kernel = container[__method__] - - def logger = container[__method__] end end end <% end %>