class Puma::Plugin

def self.create(&blk)

def self.create(&blk)
  name = extract_name(caller)
  cls = Class.new(self)
  cls.class_eval(&blk)
  Plugins.register name, cls
end

def self.extract_name(ary)

def self.extract_name(ary)
  path = ary.first[CALLER_FILE]
  m = %r!puma/plugin/([^/]*)\.rb$!.match(path)
  m[1]
end

def in_background(&blk)

def in_background(&blk)
  Plugins.add_background blk
end