lib/dripdrop/node/nodelet.rb in dripdrop-0.9.6 vs lib/dripdrop/node/nodelet.rb in dripdrop-0.9.8

- old
+ new

@@ -1,13 +1,18 @@ class DripDrop::Node # See the documentation for +nodelet+ in DripDrop::Node class Nodelet attr_accessor :name, :routing - def initialize(ctx, name, routes) + def initialize(ctx, name, *configure_args) @ctx = ctx @name = name @internal_routing = {} + configure(*configure_args) + end + + def configure(*args) + # Do nothing! end def route(name,handler_type,*handler_args) handler = @ctx.route_full(self, name, handler_type, *handler_args) @internal_routing[name] = handler