module CalendariumRomanum::CLI::Helper

Mixin providing helper methods used by multiple CLI-related classes.

@api private

Public Instance Methods

die!(message, code = 1) click to toggle source
# File lib/calendarium-romanum/cli/helper.rb, line 17
def die!(message, code = 1)
  STDERR.puts message
  exit code
end
sanctorale_from_path(path) click to toggle source
# File lib/calendarium-romanum/cli/helper.rb, line 7
def sanctorale_from_path(path)
  loader = SanctoraleLoader.new

  if path == '-'
    loader.load(STDIN)
  else
    loader.load_from_file(path)
  end
end