Sha256: d3b5bde94f7526dda07a235ce8f37ebe001a317ecf900aaa48625d50ae45c363
Contents?: true
Size: 654 Bytes
Versions: 1
Compression:
Stored size: 654 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) self 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.7 | lib/current_session/interface.rb |