class Mosquito::PeriodicTask
- Mosquito::PeriodicTask
- Reference
- Object
Defined in:
mosquito/periodic_task.crConstructors
Instance Method Summary
-
#class : Mosquito::PeriodicJob.class
Returns the runtime
Class
of an object. - #class=(class __arg0 : Mosquito::PeriodicJob.class)
- #execute
- #interval : Time::Span | Time::MonthSpan
- #interval=(interval : Time::Span | Time::MonthSpan)
- #last_executed_at : Time
- #last_executed_at=(last_executed_at : Time)
- #try_to_execute : Nil
Constructor Detail
def self.new(class __arg0 : ::Mosquito::PeriodicJob.class, interval : Time::MonthSpan | Time::Span)
#
Instance Method Detail
Description copied from class Object
Returns the runtime Class
of an object.
1.class # => Int32
"hello".class # => String
Compare it with typeof
, which returns the compile-time type of an object:
random_value = rand # => 0.627423
value = random_value < 0.5 ? 1 : "hello"
value # => "hello"
value.class # => String
typeof(value) # => Int32 | String