Class: Lotus::Config::Sessions Private
- Inherits:
 - 
      Object
      
        
- Object
 - Lotus::Config::Sessions
 
 
- Defined in:
 - lib/lotus/config/sessions.rb
 
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Sessions configuration
Constant Summary collapse
- RACK_NAMESPACE =
          
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
Ruby namespace for Rack session adapters
 'Rack::Session::%s'.freeze
- BLACKLISTED_DOMAINS =
          
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
Localhost string for detecting localhost host configuration
 %w(localhost).freeze
Instance Method Summary collapse
- 
  
    
      #enabled?  ⇒ FalseClass, TrueClass 
    
    
  
  
  
  
  
  
  
  private
  
    
Check if the sessions are enabled.
 - 
  
    
      #initialize(adapter = nil, options = {}, configuration = nil)  ⇒ Sessions 
    
    
  
  
  
    constructor
  
  
  
  
  
  private
  
    
HTTP sessions configuration.
 - 
  
    
      #middleware  ⇒ Array 
    
    
  
  
  
  
  
  
  
  private
  
    
Returns the Rack middleware and the options.
 
Constructor Details
#initialize(adapter = nil, options = {}, configuration = nil) ⇒ Sessions
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
HTTP sessions configuration
      34 35 36 37 38  | 
    
      # File 'lib/lotus/config/sessions.rb', line 34 def initialize(adapter = nil, = {}, configuration = nil) @adapter = adapter @options = @configuration = configuration end  | 
  
Instance Method Details
#enabled? ⇒ FalseClass, TrueClass
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Check if the sessions are enabled
      46 47 48  | 
    
      # File 'lib/lotus/config/sessions.rb', line 46 def enabled? !!@adapter end  | 
  
#middleware ⇒ Array
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns the Rack middleware and the options
      56 57 58 59 60 61 62 63 64 65  | 
    
      # File 'lib/lotus/config/sessions.rb', line 56 def middleware middleware = case @adapter when Symbol RACK_NAMESPACE % Utils::String.new(@adapter).classify else @adapter end [middleware, ] end  |