class Sail::Types::Cron

Cron

The Cron type returns true if the saved cron string matches the current time (ignores seconds).

Public Instance Methods

to_value() click to toggle source
# File lib/sail/types/cron.rb, line 12
def to_value
  Fugit::Cron.new(@setting.value).match?(DateTime.now.utc.change(sec: 0))
end