class Facemock::OAuth::Login
Constants
- DEFAULT_PATH
- VIEW_DIRECTORY
- VIEW_FILE_NAME
Attributes
path[RW]
Public Class Methods
view()
click to toggle source
# File lib/facemock/oauth/login.rb, line 29 def self.view File.read(filepath) end
Private Class Methods
filepath()
click to toggle source
# File lib/facemock/oauth/login.rb, line 35 def self.filepath File.join(VIEW_DIRECTORY, VIEW_FILE_NAME) end
Public Instance Methods
call(env)
click to toggle source
Calls superclass method
# File lib/facemock/oauth/login.rb, line 14 def call(env) if env["PATH_INFO"] == Login.path code = 200 body = [ Login.view ] header = { "Content-Type" => "text/html;charset=utf-8", "Content-Length" => content_length(body).to_s, "X-XSS-Protection" => "1; mode=block", "X-Content-Type-Options" => "nosniff", "X-Frame-Options" => "SAMEORIGIN" } [code, header, body] else super end end