module Tollgate::CLI

Constants

DEFAULT_CONFIG_PATH

Public Instance Methods

call(config_path: DEFAULT_CONFIG_PATH) click to toggle source
# File lib/tollgate/cli.rb, line 7
def call(config_path: DEFAULT_CONFIG_PATH)
  load(config_path) if File.exist?(config_path)

  reporter = Reporter.new
  runner = Runner.new(reporter: reporter)
  runner.(Tollgate.command_block || raise(Errors::NoConfiguration))

  puts reporter.report(success: runner.success?)

  runner.success?
end