Sha256: e2103aac5db430b551994550fba279360a33bdf5a53b6e26384ea776f67ec8a9

Contents?: true

Size: 456 Bytes

Versions: 13

Compression:

Stored size: 456 Bytes

Contents

module Locomotive
  module Steam

    class CookieService

      def initialize(request)
        @request = request
        request.env['steam.cookies'] ||= {}
        @cookies = request.env['steam.cookies']
      end

      def set(key, vals)
        @cookies[key] = vals
      end

      def get(key)
        if @cookies.include?(key)
          @cookies[key]['value']
        else
          @request.cookies[key]
        end
      end

    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
locomotivecms_steam-1.8.0.alpha2 lib/locomotive/steam/services/cookie_service.rb
locomotivecms_steam-1.8.0.alpha1 lib/locomotive/steam/services/cookie_service.rb
locomotivecms_steam-1.7.1 lib/locomotive/steam/services/cookie_service.rb
locomotivecms_steam-1.7.0 lib/locomotive/steam/services/cookie_service.rb
locomotivecms_steam-1.6.1 lib/locomotive/steam/services/cookie_service.rb
locomotivecms_steam-1.6.0 lib/locomotive/steam/services/cookie_service.rb
locomotivecms_steam-1.6.0.rc1 lib/locomotive/steam/services/cookie_service.rb
locomotivecms_steam-1.6.0.beta1 lib/locomotive/steam/services/cookie_service.rb
locomotivecms_steam-1.5.3 lib/locomotive/steam/services/cookie_service.rb
locomotivecms_steam-1.5.2 lib/locomotive/steam/services/cookie_service.rb
locomotivecms_steam-1.5.1 lib/locomotive/steam/services/cookie_service.rb
locomotivecms_steam-1.5.0 lib/locomotive/steam/services/cookie_service.rb
locomotivecms_steam-1.5.0.rc1 lib/locomotive/steam/services/cookie_service.rb