Class: CronTab::FieldSet

Inherits:
Struct
  • Object
show all
Defined in:
lib/CronTab.rb

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

Instance Attribute Details

- (Object) fields

Returns the value of attribute fields

Returns:

  • (Object)

    the current value of fields



123
124
125
# File 'lib/CronTab.rb', line 123

def fields
  @fields
end

Instance Method Details

- (Object) ===(rhs)



124
125
126
127
128
129
130
# File 'lib/CronTab.rb', line 124

def ===(rhs)
  b = false
  fields.each { |field|
    b ||= (field === rhs)
  }
  b
end

- (Object) nextof(now)



132
133
134
135
136
137
138
139
# File 'lib/CronTab.rb', line 132

def nextof(now)
  ret = nil
  fields.each { |field|
    field_nextof = field.nextof(now)
    ret = field_nextof if ret.nil? || (field_nextof && field_nextof < ret)
  }
  ret
end