Class: Keepachangelog::CLI

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

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.shellObject


8
9
10
# File 'lib/keepachangelog/cli.rb', line 8

def self.shell
  Thor::Base.shell.new
end

Instance Method Details

#parseObject


37
38
39
40
41
42
43
44
45
# File 'lib/keepachangelog/cli.rb', line 37

def parse
  case options[:from].to_sym
  when :md then parse_markdown
  when :yaml then parse_yaml
  else
    shell.error "Unknown input format #{options[:from]}"
    exit 1
  end
end

#versionObject


16
17
18
# File 'lib/keepachangelog/cli.rb', line 16

def version
  shell.say Keepachangelog.version
end