def self.define(&block)
# TODO: plugins should isolated
p = new
p.instance_eval(&block)
p.startup
# TODO: make sure required attributes are set
Plugin.attributes.each { |symbol| p.instance_variable_get("@#{symbol}").freeze }
Plugin.registered_plugins[p.name] = p
end