Class: Wheneverd::CLI::Validate

Inherits:
Wheneverd::CLI show all
Defined in:
lib/wheneverd/cli/validate.rb

Overview

Implements wheneverd validate (validate rendered OnCalendar values and unit files).

Instance Method Summary collapse

Methods inherited from Wheneverd::CLI

#handle_error, #identifier_value, #load_schedule

Instance Method Details

#executeObject



11
12
13
14
15
16
17
18
# File 'lib/wheneverd/cli/validate.rb', line 11

def execute
  units = render_units
  validate_on_calendar(units)
  validate_units(units) if verify?
  0
rescue StandardError => e
  handle_error(e)
end