Sha256: 7759d0ad705a913896ff1e334a9fa6fa5bab3cf1aa9717e99f4d5dfb31475270
Contents?: true
Size: 641 Bytes
Versions: 1
Compression:
Stored size: 641 Bytes
Contents
# frozen_string_literal: true module CurrentSession # # Interface for manipulating http request objects # module Interface extend ActiveSupport::Concern class_methods do def call(request) update(request).current_user.present? end def update(request) self.current_user = @session_methods.new(request).find self end def create(request) self.current_user = @auth_methods.new(request).connect @session_methods.new(request).create(current_user) end def destroy(request) @session_methods.new(request).destroy end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
current_session-0.1.8 | lib/current_session/interface.rb |