Class: ResponseMate::Commands::Setup
- Defined in:
- lib/response_mate/commands/setup.rb
Overview
Handles the invocation of the setup command
Instance Attribute Summary collapse
-
#output_dir ⇒ Object
Returns the value of attribute output_dir.
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(args, options) ⇒ Setup
constructor
A new instance of Setup.
- #run ⇒ Object
Constructor Details
#initialize(args, options) ⇒ Setup
Returns a new instance of Setup.
9 10 11 12 13 14 15 16 17 18 |
# File 'lib/response_mate/commands/setup.rb', line 9 def initialize(args, ) super(args, ) = .dup @output_dir = if args.present? args.first else ResponseMate.configuration.output_dir end end |
Instance Attribute Details
#output_dir ⇒ Object
Returns the value of attribute output_dir.
7 8 9 |
# File 'lib/response_mate/commands/setup.rb', line 7 def output_dir @output_dir end |
Instance Method Details
#run ⇒ Object
20 21 22 23 |
# File 'lib/response_mate/commands/setup.rb', line 20 def run FileUtils.mkdir_p(output_dir) puts "[Setup] Initialized empty directory #{output_dir}" end |