Method: Codelog::Command::New#run

Defined in:
lib/codelog/command/new.rb

#runObject



17
18
19
20
21
22
23
24
25
26
27
28
29
# File 'lib/codelog/command/new.rb', line 17

def run
  chdir Dir.pwd do
    # This script create a change file for the changelog documentation.

    @file_name = "changelogs/unreleased/#{change_file_timestamp}_#{change_file_name}.yml"
    if @options[:interactive]
      build_from_hash Codelog::CLIs::Interactive.new.run
    else
      build_from_template
    end
    system! "#{default_editor} #{@file_name}" if @options[:edit]
  end
end