Class: Rack::Request

Inherits:
Object
  • Object
show all
Defined in:
lib/maveric.rb

Instance Method Summary collapse

Instance Method Details

#mavericObject

Allows the request to provide the current maveric.



272
# File 'lib/maveric.rb', line 272

def maveric; @env['maveric']; end

#site_rootObject

Provides the compliment to #fullpath.



274
275
276
277
278
279
280
# File 'lib/maveric.rb', line 274

def site_root
  url = scheme + "://" + host
  url << ":#{port}" if \
    scheme == "https" && port != 443 || \
    scheme == "http"  && port != 80
  url
end

#urlObject



281
# File 'lib/maveric.rb', line 281

def url; site_root + fullpath; end