From 37a4a28deec224f7cd9a5a124e22258e868913e4 Mon Sep 17 00:00:00 2001 From: Gibheer Date: Mon, 26 Nov 2012 21:40:21 +0100 Subject: added the first set of documentation --- doc/Zero/Request/Accept.html | 612 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 612 insertions(+) create mode 100644 doc/Zero/Request/Accept.html (limited to 'doc/Zero/Request/Accept.html') diff --git a/doc/Zero/Request/Accept.html b/doc/Zero/Request/Accept.html new file mode 100644 index 0000000..8a45ae0 --- /dev/null +++ b/doc/Zero/Request/Accept.html @@ -0,0 +1,612 @@ + + + + + + Class: Zero::Request::Accept + + — Documentation by YARD 0.8.3 + + + + + + + + + + + + + + + + + + + + + +

Class: Zero::Request::Accept + + + +

+ +
+ +
Inherits:
+
+ Object + +
    +
  • Object
  • + + + +
+ show all + +
+ + + + + + + + + +
Defined in:
+
lib/zero/request/accept.rb
+ +
+
+ +

Overview

+
+ +

encapsulates the accept header to easier work with this is partly copied +from sinatra

+ + +
+
+
+ + +
+

Constant Summary

+ +
+ +
MEDIA_TYPE_SEPERATOR = + +
+
','
+
+ +
MEDIA_PARAM_SEPERATOR = + +
+
';'
+
+ +
MEDIA_QUALITY_REGEX = + +
+
/q=[01]\./
+
+ +
KEY_HTTP_ACCEPT = + +
+
'HTTP_ACCEPT'
+
+ +
KEY_HTTP_ACCEPT_LANGUAGE = + +
+
'HTTP_ACCEPT_LANGUAGE'
+
+ +
KEY_HTTP_ACCEPT_ENCODING = + +
+
'HTTP_ACCEPT_ENCODING'
+
+ +
+ + + + + +

Instance Attribute Summary (collapse)

+ + + + + + +

+ Class Method Summary + (collapse) +

+ + + +

+ Instance Method Summary + (collapse) +

+ + + + +
+

Constructor Details

+ +
+

+ + - (Accept) initialize(environment) + + + + + +

+
+ +

create a new accept object

+ + +
+
+
+ + +
+ + + + +
+
+
+
+25
+26
+27
+28
+29
+
+
# File 'lib/zero/request/accept.rb', line 25
+
+def initialize(environment)
+  @types = AcceptType.new(environment[KEY_HTTP_ACCEPT])
+  @language = AcceptType.new(environment[KEY_HTTP_ACCEPT_LANGUAGE])
+  @encoding = AcceptType.new(environment[KEY_HTTP_ACCEPT_ENCODING])
+end
+
+
+
+ +
+ +
+

Instance Attribute Details

+ + + +
+

+ + - (Object) encoding (readonly) + + + + + +

+
+ +

Returns the value of attribute encoding

+ + +
+
+
+ + +
+ + + + +
+
+
+
+33
+34
+35
+
+
# File 'lib/zero/request/accept.rb', line 33
+
+def encoding
+  @encoding
+end
+
+
+
+ + + +
+

+ + - (Object) language (readonly) + + + + + +

+
+ +

Returns the value of attribute language

+ + +
+
+
+ + +
+ + + + +
+
+
+
+32
+33
+34
+
+
# File 'lib/zero/request/accept.rb', line 32
+
+def language
+  @language
+end
+
+
+
+ + + +
+

+ + - (Object) types (readonly) + + + + + +

+
+ +

Returns the value of attribute types

+ + +
+
+
+ + +
+ + + + +
+
+
+
+31
+32
+33
+
+
# File 'lib/zero/request/accept.rb', line 31
+
+def types
+  @types
+end
+
+
+
+ +
+ + +
+

Class Method Details

+ + +
+

+ + + (Object) map + + + + + +

+ + + + +
+
+
+
+20
+21
+22
+
+
# File 'lib/zero/request/accept.rb', line 20
+
+def self.map
+  @@map ||= {}
+end
+
+
+
+ +
+

+ + + (Object) map=(map) + + + + + +

+ + + + +
+
+
+
+16
+17
+18
+
+
# File 'lib/zero/request/accept.rb', line 16
+
+def self.map=(map)
+  @@map = map
+end
+
+
+
+ +
+ +
+ + + + + \ No newline at end of file -- cgit v1.2.3-70-g09d2