Class: PasswordChanger::Cli::Init

Inherits:
Thor
  • Object
show all
Includes:
Thor::Actions
Defined in:
lib/password_changer/cli/init.rb

Overview

This class provides an ‘presentation init’ command for the middleman CLI.

Instance Method Summary collapse

Instance Method Details

#applicationObject



11
12
13
14
15
16
17
18
19
# File 'lib/password_changer/cli/init.rb', line 11

def application
  source_paths << File.expand_path('../../../../templates', __FILE__)

  @version = PasswordChanger::VERSION
  @config = PasswordChanger.config

  opts = options.dup.deep_symbolize_keys
  template 'config.yaml.tt', opts.delete(:configuration_file), **opts
end