Class: Castle::Extractors::ClientId
- Inherits:
-
Object
- Object
- Castle::Extractors::ClientId
- Defined in:
- lib/castle/extractors/client_id.rb
Overview
used for extraction of cookies and headers from the request
Instance Method Summary collapse
-
#call ⇒ String
extracts client id.
-
#initialize(headers, cookies) ⇒ ClientId
constructor
A new instance of ClientId.
Constructor Details
#initialize(headers, cookies) ⇒ ClientId
Returns a new instance of ClientId.
9 10 11 12 |
# File 'lib/castle/extractors/client_id.rb', line 9 def initialize(headers, ) @headers = headers = || {} end |
Instance Method Details
#call ⇒ String
extracts client id
16 17 18 |
# File 'lib/castle/extractors/client_id.rb', line 16 def call @headers['X-Castle-Client-Id'] || ['__cid'] || '' end |