How can I update an expression in a Runt::Schedule object?

Posted by Reid Beels on Stack Overflow See other posts from Stack Overflow or by Reid Beels
Published on 2010-04-20T02:37:48Z Indexed on 2010/04/20 2:43 UTC
Read the original article Hit count: 325

Filed under:
|
|
|
|

Runt provides a Schedule class for managing collections of events, each represented by a temporal expression. The Schedule class provides an update method, cited in the release notes as "allowing clients to update existing expressions". The implementation of this method, however, simply calls a supplied block, providing the temporal expression for the specified event (as shown).

# From lib/runt/schedule.rb:61
#
# Call the supplied block/Proc with the currently configured 
# TemporalExpression associated with the supplied Event.
#
def update(event,&block)
  block.call(@elems[event])
end

How is one expected to use this method to update an expression?

© Stack Overflow or respective owner

Related posts about ruby

Related posts about runt