Class: Rack::Request
- Inherits:
-
Object
- Object
- Rack::Request
- Defined in:
- lib/maveric.rb
Instance Method Summary collapse
-
#maveric ⇒ Object
Allows the request to provide the current maveric.
-
#site_root ⇒ Object
Provides the compliment to #fullpath.
- #url ⇒ Object
Instance Method Details
#maveric ⇒ Object
Allows the request to provide the current maveric.
272 |
# File 'lib/maveric.rb', line 272 def maveric; @env['maveric']; end |
#site_root ⇒ Object
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 |
#url ⇒ Object
281 |
# File 'lib/maveric.rb', line 281 def url; site_root + fullpath; end |