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.



65
66
67
68
69
70
71
72
# File 'lib/ynab_convert.rb', line 65

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

  show_usage
  exit
end

Instance Method Details

#startObject



74
75
76
77
78
# File 'lib/ynab_convert.rb', line 74

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