class Keepachangelog::CLI

Public Class Methods

shell() click to toggle source
# File lib/keepachangelog/cli.rb, line 8
def self.shell
  Thor::Base.shell.new
end

Public Instance Methods

parse() click to toggle source
# 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
version() click to toggle source
# File lib/keepachangelog/cli.rb, line 16
def version
  shell.say Keepachangelog.version
end

Private Instance Methods

parse_markdown() click to toggle source
# File lib/keepachangelog/cli.rb, line 51
def parse_markdown
  parser = MarkdownParser.load(options[:in])
  print parser
end
parse_yaml() click to toggle source
# File lib/keepachangelog/cli.rb, line 56
def parse_yaml
  parser = YamlParser.load(options[:in])
  print parser
end
print(parser) click to toggle source

rubocop:disable Metrics/AbcSize