lib/rack/app/class_methods.rb in rack-app-0.2.3 vs lib/rack/app/class_methods.rb in rack-app-0.3.0

- old
+ new

@@ -1,6 +1,6 @@ -module Rack::APP::ClassMethods +module Rack::App::ClassMethods def description(*description_texts) @last_description = description_texts.join("\n") end @@ -31,16 +31,16 @@ def patch(path = '/', &block) add_route('PATCH', path, &block) end def router - @static_router ||= Rack::APP::Router.new + @static_router ||= Rack::App::Router.new end def add_route(request_method, request_path, &block) - endpoint = Rack::APP::Endpoint.new( + endpoint = Rack::App::Endpoint.new( self, { request_method: request_method, request_path: request_path, description: @last_description @@ -55,11 +55,11 @@ end def mount(api_class) - unless api_class.is_a?(Class) and api_class <= Rack::APP - raise(ArgumentError, 'Invalid class given for mount, must be a Rack::APP') + unless api_class.is_a?(Class) and api_class <= Rack::App + raise(ArgumentError, 'Invalid class given for mount, must be a Rack::App') end router.merge!(api_class.router) nil \ No newline at end of file