def sessions(adapter = nil, options = {})
      if adapter.nil?
        @sessions ||= Config::Sessions.new
      else
        @sessions = Config::Sessions.new(adapter, options, self)
      end
    end
def sessions(adapter = nil, options = {})
      if adapter.nil?
        @sessions ||= Config::Sessions.new
      else
        @sessions = Config::Sessions.new(adapter, options, self)
      end
    end
Configure sessions
 Enable sessions (disabled by default).

 This is part of a DSL, for this reason when this method is called with
 an argument, it will set the corresponding instance variable. When
 called without, it will return the already set value, or the default.

 Given Class as adapter it will be used as sessions middleware.
 Given String as adapter it will be resolved as class name and used as
 sessions middleware.
 Given Symbol as adapter it is assumed it's name of the class under
 Rack::Session namespace that will be used as sessions middleware
 (e.g. :cookie for Rack::Session::Cookie).

 By default options include domain inferred from host configuration, and
 secure flag inferred from scheme configuration.

 @overload sessions(adapter, options)
   Sets the given value.
   @param adapter [Class, String, Symbol] Rack middleware for sessions management
   @param options [Hash] options to pass to sessions middleware

 @overload sessions(false)
   Disables sessions

 @overload sessions
   Gets the value.
   @return [Hanami::Config::Sessions] sessions configuration

 @since 0.2.0

 @see Hanami::Configuration#host
 @see Hanami::Configuration#scheme

 @example Getting the value
   require 'hanami'

   module Bookshelf
     class Application < Hanami::Application
     end
   end

   Bookshelf::Application.configuration.sessions
     # => #<Hanami::Config::Sessions:0x00000001ca0c28 @enabled=false>

 @example Setting the value with symbol
   require 'hanami'

   module Bookshelf
     class Application < Hanami::Application
       configure do
         sessions :cookie, secret: 'abc123'
       end
     end
   end

   Bookshelf::Application.configuration.sessions
     # => #<Hanami::Config::Sessions:0x00000001589458 @enabled=true, @adapter=:cookie, @options={:domain=>"localhost", :secure=>false}>

 @example Disabling previously enabled sessions
   require 'hanami'

   module Bookshelf
     class Application < Hanami::Application
       configure do
         sessions :cookie
         sessions false
       end
     end
   end

   Bookshelf::Application.configuration.sessions
     # => #<Hanami::Config::Sessions:0x00000002460d78 @enabled=false>