Class: MediumToWebflow::CLI

Inherits:
Thor
  • Object
show all
Defined in:
lib/medium_to_webflow/cli.rb

Instance Method Summary collapse

Instance Method Details

#initObject



56
57
58
# File 'lib/medium_to_webflow/cli.rb', line 56

def init
  create_file(options[:path], config_template)
end

#syncObject



36
37
38
39
40
41
42
43
44
45
46
47
48
# File 'lib/medium_to_webflow/cli.rb', line 36

def sync
  load_config if options[:config]

  MediumToWebflow.configure do |config|
    config.verbose = options[:verbose]
    config.force_update = options[:force_update]
  end

  MediumToWebflow.sync(options)
rescue Error => e
  error "Failed to sync: #{e.message}"
  exit 1
end