Class: Cosensee::CLI::Initializer
- Inherits:
-
Object
- Object
- Cosensee::CLI::Initializer
- Defined in:
- lib/cosensee/cli/initializer.rb
Overview
for initializer
Instance Attribute Summary collapse
-
#logger ⇒ Object
readonly
Returns the value of attribute logger.
-
#option ⇒ Object
readonly
Returns the value of attribute option.
Instance Method Summary collapse
-
#initialize(logger:, option:) ⇒ Initializer
constructor
A new instance of Initializer.
- #run ⇒ Object
Constructor Details
#initialize(logger:, option:) ⇒ Initializer
Returns a new instance of Initializer.
8 9 10 11 |
# File 'lib/cosensee/cli/initializer.rb', line 8 def initialize(logger:, option:) @logger = logger @option = option end |
Instance Attribute Details
#logger ⇒ Object (readonly)
Returns the value of attribute logger.
13 14 15 |
# File 'lib/cosensee/cli/initializer.rb', line 13 def logger @logger end |
#option ⇒ Object (readonly)
Returns the value of attribute option.
13 14 15 |
# File 'lib/cosensee/cli/initializer.rb', line 13 def option @option end |
Instance Method Details
#run ⇒ Object
15 16 17 18 19 20 21 |
# File 'lib/cosensee/cli/initializer.rb', line 15 def run logger.info 'Initializing...' create_project_dir if option.init? create_directories create_files logger.info 'Done!' end |