<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -5,7 +5,7 @@ module Crondle
     end
 
     def job(cmd, options = {})
-      j = Job.new(next_desc, cmd, options)
+      j = Job.new(next_desc, cmd, carry_over_options.merge(options))
       jobs &lt;&lt; j
       j
     end
@@ -18,9 +18,20 @@ module Crondle
       @jobs ||= []
     end
 
+    def with_options(options, &amp;block)
+      @carry_over_options = options
+      yield self
+      @carry_over_options.clear
+    end
+
     private
     def next_desc
       @next_desc || &quot;&quot;
     end
+
+    def carry_over_options
+      @carry_over_options || {}
+    end
+
   end
 end</diff>
      <filename>lib/crondle/builder.rb</filename>
    </modified>
    <modified>
      <diff>@@ -60,5 +60,22 @@ module Crondle
       j.hour.should equal(0)
       j.minute.should equal(0)
     end
+
+    it &quot;should apply the #with_options options to the Jobs defined in the #with_options block&quot; do
+      b = Builder.new
+      b.with_options :month =&gt; 3 do
+        b.job(&quot;ls&quot;)
+      end
+      b.jobs.first.month.should eql(3)
+    end
+
+    it &quot;should reset the carry over options once the #with_options block has ended&quot; do
+      b = Builder.new
+      b.with_options :month =&gt; 3 do
+      end
+      b.job(&quot;ls&quot;)
+      b.jobs.first.month.should_not be
+    end
+
   end
 end</diff>
      <filename>spec/crondle/builder_spec.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>7d3550496a30c3240c3dd7ff384f0239e11c8ccb</id>
    </parent>
  </parents>
  <author>
    <name>Martin Grenfell</name>
    <email>martin_grenfell@msn.com</email>
  </author>
  <url>http://github.com/scrooloose/crondle/commit/1b699df4eeef93ef99eee3e5fbd3f0d18bff413d</url>
  <id>1b699df4eeef93ef99eee3e5fbd3f0d18bff413d</id>
  <committed-date>2008-04-10T01:59:04-07:00</committed-date>
  <authored-date>2008-04-10T01:59:04-07:00</authored-date>
  <message>implemented Builder#with_options which takes a hash of timing options and a block of job definitions to apply them to</message>
  <tree>a88176603abc3978b468dfceadaeb00938ff977c</tree>
  <committer>
    <name>Martin Grenfell</name>
    <email>martin_grenfell@msn.com</email>
  </committer>
</commit>
