lib/rubysmith/cli/actions/config.rb in rubysmith-2.0.2 vs lib/rubysmith/cli/actions/config.rb in rubysmith-3.0.0
- old
+ new
@@ -3,13 +3,15 @@
module Rubysmith
module CLI
module Actions
# Handles the config action.
class Config
- def initialize client: Configuration::Loader::CLIENT, container: Container
+ include Rubysmith::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 +20,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