From 80e6aeda54f72f3967011b999d51bf377dd54cf3 Mon Sep 17 00:00:00 2001 From: Tom Preston-Werner Date: Mon, 2 Jan 2012 17:48:59 -0700 Subject: [PATCH] Eliminate unnecessary accessors. --- lib/god/driver.rb | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/lib/god/driver.rb b/lib/god/driver.rb index b51780a1..e38001ca 100644 --- a/lib/god/driver.rb +++ b/lib/god/driver.rb @@ -29,12 +29,10 @@ def <=>(other) end # DriverEvent class DriverEvent < TimedEvent - attr_accessor :condition, :task - def initialize(delay, task, condition) - super delay - self.task = task - self.condition = condition + super(delay) + @task = task + @condition = condition end def handle_event @@ -43,13 +41,11 @@ def handle_event end # DriverEvent class DriverOperation < TimedEvent - attr_accessor :task, :name, :args - def initialize(task, name, args) super(0) - self.task = task - self.name = name - self.args = args + @task = task + @name = name + @args = args end # Handle the next queued operation that was issued asynchronously