Class: Cybertrain::Cron::Expression

Inherits:
Object
  • Object
show all
Defined in:
cybertrain/cron.rb

Overview

A parsed expression: the values each field allows, sorted, and the text it was parsed from. Built by parse; immutable.

Instance Attribute Summary collapse

Instance Attribute Details

#days ⇒ Array<Integer> (readonly)

Returns the days of month (1..31) it allows, sorted.

Returns:

  • (Array<Integer>) —

    the days of month (1..31) it allows, sorted



56
57
58
# File 'cybertrain/cron.rb', line 56

def days
  @days
end

#expression_text ⇒ String (readonly)

Returns the text it was parsed from, as given.

Returns:

  • (String) —

    the text it was parsed from, as given



66
67
68
# File 'cybertrain/cron.rb', line 66

def expression_text
  @expression_text
end

#hours ⇒ Array<Integer> (readonly)

Returns the hours (0..23) it runs at, sorted.

Returns:

  • (Array<Integer>) —

    the hours (0..23) it runs at, sorted



53
54
55
# File 'cybertrain/cron.rb', line 53

def hours
  @hours
end

#minutes ⇒ Array<Integer> (readonly)

Returns the minutes (0..59) it runs at, sorted.

Returns:

  • (Array<Integer>) —

    the minutes (0..59) it runs at, sorted



50
51
52
# File 'cybertrain/cron.rb', line 50

def minutes
  @minutes
end

#months ⇒ Array<Integer> (readonly)

Returns the months (1..12) it allows, sorted.

Returns:

  • (Array<Integer>) —

    the months (1..12) it allows, sorted



59
60
61
# File 'cybertrain/cron.rb', line 59

def months
  @months
end

#wdays ⇒ Array<Integer> (readonly)

Returns the days of week (0..6, 0 is Sunday) it allows, sorted.

Returns:

  • (Array<Integer>) —

    the days of week (0..6, 0 is Sunday) it allows, sorted



63
64
65
# File 'cybertrain/cron.rb', line 63

def wdays
  @wdays
end