Class: Castle::Context::GetDefault
- Inherits:
-
Object
- Object
- Castle::Context::GetDefault
- Defined in:
- lib/castle/context/get_default.rb
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(request, cookies = nil) ⇒ GetDefault
constructor
A new instance of GetDefault.
Constructor Details
Instance Method Details
#call ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/castle/context/get_default.rb', line 12 def call { client_id: client_id, active: true, headers: headers, ip: ip, library: { name: 'castle-rb', version: Castle::VERSION } }.tap do |result| result[:locale] = locale if locale result[:user_agent] = user_agent if user_agent end end |