Class: Sod::Prefabs::Actions::Config::Delete
- Defined in:
- lib/sod/prefabs/actions/config/delete.rb
Overview
Deletes project configuration.
Instance Attribute Summary
Attributes inherited from Action
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(path = nil) ⇒ Delete
constructor
:reek:ControlParameter.
Methods inherited from Action
ancillary, default, description, inherited, #inspect, on, #to_proc
Constructor Details
#initialize(path = nil) ⇒ Delete
:reek:ControlParameter
24 25 26 27 |
# File 'lib/sod/prefabs/actions/config/delete.rb', line 24 def initialize(path = nil, **) super(**) @path = Pathname(path || context.xdg_config.active) end |
Instance Method Details
#call ⇒ Object
29 30 31 32 33 34 35 |
# File 'lib/sod/prefabs/actions/config/delete.rb', line 29 def call(*) ARGV.clear return confirm if path.exist? logger.warn { "Skipped. Configuration doesn't exist: #{path_info}." } end |