Class: RubyApp::Rack::Route

Inherits:
Object
  • Object
show all
Extended by:
Mixins::RouteMixin
Defined in:
lib/ruby_app/rack/route.rb

Constant Summary

Constants included from Mixins::RouteMixin

Mixins::RouteMixin::GET, Mixins::RouteMixin::POST

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Mixins::RouteMixin

clear_routes, do_route, route, routes

Class Method Details

.get_content_type(format) ⇒ Object



101
102
103
# File 'lib/ruby_app/rack/route.rb', line 101

def self.get_content_type(format)
  ( mime_type = MIME::Types.type_for(format)[0] ) ? mime_type.content_type : 'text/plain'
end

Instance Method Details

#call(environment) ⇒ Object



22
23
24
# File 'lib/ruby_app/rack/route.rb', line 22

def call(environment)
  self.class.do_route(RubyApp::Request.request_method, RubyApp::Request.path)
end