class Groundskeeper::Middleware::Subdomain

Constants

DEPTH_DEFAULT
DEPTH_KEY
PARSE_DEFAULT
PARSE_KEY
RACK_HOST_KEY

Private Instance Methods

depth() click to toggle source
# File lib/groundskeeper/middleware/subdomain.rb, line 26
        def depth
  @options[depth_key].to_i * -1 || depth_default
end
depth_default() click to toggle source
# File lib/groundskeeper/middleware/subdomain.rb, line 34
        def depth_default
  self.class.const_get("DEPTH_DEFAULT")
end
depth_key() click to toggle source
# File lib/groundskeeper/middleware/subdomain.rb, line 30
        def depth_key
  self.class.const_get("DEPTH_KEY")
end
namespace() click to toggle source
# File lib/groundskeeper/middleware/subdomain.rb, line 10
        def namespace
  parse.call(@env[rack_host_key], depth)
end
parse() click to toggle source
# File lib/groundskeeper/middleware/subdomain.rb, line 14
        def parse
  @options[parse_key] || parse_default
end
parse_default() click to toggle source
# File lib/groundskeeper/middleware/subdomain.rb, line 22
        def parse_default
  self.class.const_get("PARSE_DEFAULT")
end
parse_key() click to toggle source
# File lib/groundskeeper/middleware/subdomain.rb, line 18
        def parse_key
  self.class.const_get("PARSE_KEY")
end
rack_host_key() click to toggle source
# File lib/groundskeeper/middleware/subdomain.rb, line 38
        def rack_host_key
  self.class.const_get("RACK_HOST_KEY")
end