Skip to content
Snippets Groups Projects
Commit c300f3bf authored by pjs's avatar pjs
Browse files

Minor comment revisions in simplekit module


Signed-off-by: default avatarpjs <pjs@alum.mit.edu>
parent ffec80ed
No related branches found
No related tags found
No related merge requests found
......@@ -6,6 +6,7 @@ require 'pqueue'
# of methods with these names in your model. All but :run are
# delegated to the EventScheduler class.
module SimpleKit
# This is the set of module methods to be passed to the EventScheduler
DELEGATED_METHODS = [:model_time, :schedule, :halt]
# Run the model by creating a new EventScheduler and invoking its run method.
......@@ -14,6 +15,7 @@ module SimpleKit
@mySim.run
end
# If a method doesn't exist in the model class, try to delegate it.
def method_missing(name, *args)
if DELEGATED_METHODS.include?(name)
@mySim.send(name, *args)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment