Class: Facebook::Login::Request

Inherits:
Rack::Request
  • Object
show all
Defined in:
lib/facebook/login.rb

Instance Method Summary collapse

Instance Method Details

#sessionObject

for storing :request_token, :access_token



54
55
56
# File 'lib/facebook/login.rb', line 54

def session
  env['rack.session'] ||= {}
end

#url_for(path) ⇒ Object

SUCKS: must duplicate logic from the ‘url` method



59
60
61
62
63
64
65
66
67
68
# File 'lib/facebook/login.rb', line 59

def url_for(path)
  url = scheme + '://' + host

  if scheme == 'https' && port != 443 ||
      scheme == 'http' && port != 80
    url << ":#{port}"
  end

  url << path
end