class Freedom::Request
Public Class Methods
new(env)
click to toggle source
Calls superclass method
# File lib/freedom/core/request.rb, line 3 def initialize(env) super(env) @post_data = nil @domain = nil @scheme = nil end
Public Instance Methods
domain()
click to toggle source
# File lib/freedom/core/request.rb, line 15 def domain return @domain if @domain match_data = @env["REQUEST_URI"].match(/.+\:\/\/(.+?)\//) @domain = match_data[1] end
post_data()
click to toggle source
# File lib/freedom/core/request.rb, line 10 def post_data return @post_data if @post_data @post_data = body.read end
scheme()
click to toggle source
# File lib/freedom/core/request.rb, line 21 def scheme return @scheme if @scheme match_data = @env["REQUEST_URI"].match(/(.+)\:\/\//) @scheme = match_data[1] end