Class: YnabConvert::CLI

Inherits:
Object
  • Object
show all
Includes:
CoreExtensions::String::Inflections, YnabLogger
Defined in:
lib/ynab_convert.rb

Overview

The command line interface methods

Instance Method Summary collapse

Methods included from CoreExtensions::String::Inflections

#camel_case, #snake_case

Methods included from YnabLogger

#logger

Constructor Details

#initializeCLI

Returns a new instance of CLI.



55
56
57
58
59
60
61
62
# File 'lib/ynab_convert.rb', line 55

def initialize
  @metadata = Metadata.new
  @options = parse_argv
  return unless no_options_given?

  show_usage
  exit
end

Instance Method Details

#startObject



64
65
66
67
68
# File 'lib/ynab_convert.rb', line 64

def start
  @file = Converter.new opts
  logger.debug "Using processor `#{@options[:institution]}' => #{processor}"
  @file.to_ynab!
end