Class: Umwelt::CLI::Commands::Example
- Inherits:
-
Hanami::CLI::Command
- Object
- Hanami::CLI::Command
- Umwelt::CLI::Commands::Example
- Defined in:
- lib/umwelt/cli/commands/example.rb
Instance Method Summary collapse
Instance Method Details
#call(**options) ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/umwelt/cli/commands/example.rb', line 12 def call(**) FileUtils.cp_r( examples_dir, target_dir(.fetch(:target)), verbose: true ) end |
#examples_dir ⇒ Object
20 21 22 |
# File 'lib/umwelt/cli/commands/example.rb', line 20 def examples_dir Pathname.new(__dir__) / '../../../../spec/examples/.' end |
#target_dir(target) ⇒ Object
24 25 26 |
# File 'lib/umwelt/cli/commands/example.rb', line 24 def target_dir(target) Pathname.pwd / target end |