lib/milestoner/cli/actions/config.rb in milestoner-13.3.1 vs lib/milestoner/cli/actions/config.rb in milestoner-14.0.0
- old
+ new
@@ -3,13 +3,15 @@
module Milestoner
module CLI
module Actions
# Handles the gem configuration action.
class Config
- def initialize configuration: Configuration::Loader::CLIENT, container: Container
+ include Milestoner::Import[:kernel, :logger]
+
+ def initialize configuration: Configuration::Loader::CLIENT, **dependencies
+ super(**dependencies)
@configuration = configuration
- @container = container
end
def call action
case action
when :edit then edit
@@ -18,18 +20,14 @@
end
end
private
- attr_reader :configuration, :container
+ attr_reader :configuration
def edit = kernel.system("$EDITOR #{configuration.current}")
def view = kernel.system("cat #{configuration.current}")
-
- def kernel = container[__method__]
-
- def logger = container[__method__]
end
end
end
end