Class: Sod::Prefabs::Actions::Config::Create
- Defined in:
- lib/sod/prefabs/actions/config/create.rb
Overview
Creates project configuration.
Instance Attribute Summary
Attributes inherited from Action
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(xdg_config = nil, defaults_path: nil) ⇒ Create
constructor
A new instance of Create.
Methods inherited from Action
ancillary, default, description, inherited, #inspect, on, #to_proc
Constructor Details
#initialize(xdg_config = nil, defaults_path: nil) ⇒ Create
Returns a new instance of Create.
21 22 23 24 25 |
# File 'lib/sod/prefabs/actions/config/create.rb', line 21 def initialize(xdg_config = nil, defaults_path: nil, **) super(**) @xdg_config = context[xdg_config, :xdg_config] @defaults_path = Pathname context[defaults_path, :defaults_path] end |
Instance Method Details
#call ⇒ Object
27 28 29 30 |
# File 'lib/sod/prefabs/actions/config/create.rb', line 27 def call(*) ARGV.clear check_defaults && choose end |