Module: Responses

Included in:
ResponseContext
Defined in:
lib/gemini_server/responses.rb

Instance Method Summary collapse

Instance Method Details

#bad_request(explanation = "Bad request") ⇒ Object



60
61
62
# File 'lib/gemini_server/responses.rb', line 60

def bad_request explanation = "Bad request"
  respond 59, explanation
end

#certificate_not_authorized(explanation = "Certificate not authorized") ⇒ Object



69
70
71
# File 'lib/gemini_server/responses.rb', line 69

def certificate_not_authorized explanation = "Certificate not authorized"
  respond 61, explanation
end

#certificate_not_valid(explanation = "Certificate not valid") ⇒ Object



73
74
75
# File 'lib/gemini_server/responses.rb', line 73

def certificate_not_valid explanation = "Certificate not valid"
  respond 62, explanation
end

#cgi_error(explanation = "CGI error") ⇒ Object



32
33
34
# File 'lib/gemini_server/responses.rb', line 32

def cgi_error explanation = "CGI error"
  respond 42, explanation
end

#client_certificate_required(explanation = "Client certificate required") ⇒ Object Also known as: certificate_required



64
65
66
# File 'lib/gemini_server/responses.rb', line 64

def client_certificate_required explanation = "Client certificate required"
  respond 60, explanation
end

#gone(explanation = "Gone") ⇒ Object



52
53
54
# File 'lib/gemini_server/responses.rb', line 52

def gone explanation = "Gone"
  respond 52, explanation
end

#input(prompt) ⇒ Object



4
5
6
# File 'lib/gemini_server/responses.rb', line 4

def input prompt
  respond 10, prompt
end

#not_found(explanation = "Not found") ⇒ Object



48
49
50
# File 'lib/gemini_server/responses.rb', line 48

def not_found explanation = "Not found"
  respond 51, explanation
end

#permanent_failure(explanation = "Permanent failure") ⇒ Object



44
45
46
# File 'lib/gemini_server/responses.rb', line 44

def permanent_failure explanation = "Permanent failure"
  respond 50, explanation
end

#proxy_error(explanation = "Proxy error") ⇒ Object



36
37
38
# File 'lib/gemini_server/responses.rb', line 36

def proxy_error explanation = "Proxy error"
  respond 43, explanation
end

#proxy_request_refused(explanation = "Proxy request refused") ⇒ Object



56
57
58
# File 'lib/gemini_server/responses.rb', line 56

def proxy_request_refused explanation = "Proxy request refused"
  respond 53, explanation
end

#redirect_permanent(url) ⇒ Object



20
21
22
# File 'lib/gemini_server/responses.rb', line 20

def redirect_permanent url
  respond 31, url
end

#redirect_temporary(url) ⇒ Object



16
17
18
# File 'lib/gemini_server/responses.rb', line 16

def redirect_temporary url
  respond 30, url
end

#sensitive_input(prompt) ⇒ Object



8
9
10
# File 'lib/gemini_server/responses.rb', line 8

def sensitive_input prompt
  respond 11, prompt
end

#server_unavailable(explanation = "Server unavailable") ⇒ Object



28
29
30
# File 'lib/gemini_server/responses.rb', line 28

def server_unavailable explanation = "Server unavailable"
  respond 41, explanation
end

#slow_down(delay) ⇒ Object



40
41
42
# File 'lib/gemini_server/responses.rb', line 40

def slow_down delay
  respond 44, delay
end

#success(body, mime_type = nil) ⇒ Object



12
13
14
# File 'lib/gemini_server/responses.rb', line 12

def success body, mime_type=nil
  respond 20, mime_type, body
end

#temporary_failure(explanation = "Temporary failure") ⇒ Object



24
25
26
# File 'lib/gemini_server/responses.rb', line 24

def temporary_failure explanation = "Temporary failure"
  respond 40, explanation
end