Permalink
Browse files

Eliminate unnecessary accessors.

  • Loading branch information...
1 parent c1d523d commit 80e6aeda54f72f3967011b999d51bf377dd54cf3 @mojombo committed Jan 3, 2012
Showing with 6 additions and 10 deletions.
  1. +6 −10 lib/god/driver.rb
View
16 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

0 comments on commit 80e6aed

Please sign in to comment.