Sha256: 5aaaf5406408fddb2de2aea9d95e0ca221716f73007ce538931087fdbcbbab49
Contents?: true
Size: 799 Bytes
Versions: 52
Compression:
Stored size: 799 Bytes
Contents
class Rack::App::CLI::Fetcher::Server < Rack::Server def get_rack_app app_class = self.app last_app = nil until app_class.is_a?(Class) && app_class <= Rack::App raise if app_class.__id__ == last_app.__id__ app_class.instance_variables.each do |ivar| value = app_class.instance_variable_get(ivar) if value.respond_to?(:call) and not [Method, Proc, UnboundMethod].include?(value.class) app_class = value end end last_app = app_class end app_class rescue end Abort = Class.new(StandardError) def app super rescue Abort Class.new(Rack::App) end def abort(*messages) raise(Abort) end class Options def parse!(argv) {} end end def opt_parser Options.new end end
Version data entries
52 entries across 52 versions & 2 rubygems