Navigation Menu

Skip to content

Commit

Permalink
Eliminate unnecessary accessors.
Browse files Browse the repository at this point in the history
  • Loading branch information
mojombo committed Jan 3, 2012
1 parent c1d523d commit 80e6aed
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions lib/god/driver.rb
Expand Up @@ -29,12 +29,10 @@ def <=>(other)
end # DriverEvent end # DriverEvent


class DriverEvent < TimedEvent class DriverEvent < TimedEvent
attr_accessor :condition, :task

def initialize(delay, task, condition) def initialize(delay, task, condition)
super delay super(delay)
self.task = task @task = task
self.condition = condition @condition = condition
end end


def handle_event def handle_event
Expand All @@ -43,13 +41,11 @@ def handle_event
end # DriverEvent end # DriverEvent


class DriverOperation < TimedEvent class DriverOperation < TimedEvent
attr_accessor :task, :name, :args

def initialize(task, name, args) def initialize(task, name, args)
super(0) super(0)
self.task = task @task = task
self.name = name @name = name
self.args = args @args = args
end end


# Handle the next queued operation that was issued asynchronously # Handle the next queued operation that was issued asynchronously
Expand Down

0 comments on commit 80e6aed

Please sign in to comment.