-
Notifications
You must be signed in to change notification settings - Fork 331
Open
Labels
Description
Jotting this down for feedback and for future reference.
# frozen_string_literal: true
module JekyllImport
class Foobar < Importers::Importer
title "Foo Bar"
needs "sequel", "sqlite3", "safe_yaml"
set_option "dbname", "--dbname DB", "Database name."
set_option "user", "--user NAME", "Database user name."
set_option "password", "--password PW", "Database user's password. (default: '')"
set_option "host", "--host HOST", "Database host name. (default: 'localhost')"
set_option "port", "--port NUM", "Database port. (default: '8080')"
class << self
# Entry point.
# Mandatory public method. Will raise exception if not defined.
def process(options)
# ...
end
# Optional public method
def validate(options)
# ...
end
private
# ...
end
end
end