Sha256: 27c914c9f547aa72d2930fce4776df4d33f41895333a4b300bf1671422cfaf66

Contents?: true

Size: 784 Bytes

Versions: 25

Compression:

Stored size: 784 Bytes

Contents

module Isomorfeus
  module Puppetmaster
    class Cookie
      def initialize(attributes)
        @attributes = attributes
      end

      def ==(other)
        return super unless other.is_a? String
        value == other
      end

      def domain
        @attributes['domain']
      end

      def expires
        Time.at @attributes['expires'] unless [nil, 0, -1].include? @attributes['expires']
      end

      def http_only?
        !!@attributes['httpOnly']
      end

      def name
        @attributes['name']
      end

      def value
        @attributes['value']
      end

      def path
        @attributes['path']
      end

      def secure?
        !!@attributes['secure']
      end

      def same_site
        @attributes['sameSite']
      end
    end
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
isomorfeus-puppetmaster-0.5.5 lib/isomorfeus/puppetmaster/cookie.rb
isomorfeus-puppetmaster-0.5.4 lib/isomorfeus/puppetmaster/cookie.rb
isomorfeus-puppetmaster-0.5.3 lib/isomorfeus/puppetmaster/cookie.rb
isomorfeus-puppetmaster-0.5.2 lib/isomorfeus/puppetmaster/cookie.rb
isomorfeus-puppetmaster-0.5.1 lib/isomorfeus/puppetmaster/cookie.rb
isomorfeus-puppetmaster-0.5.0 lib/isomorfeus/puppetmaster/cookie.rb
isomorfeus-puppetmaster-0.4.1 lib/isomorfeus/puppetmaster/cookie.rb
isomorfeus-puppetmaster-0.4.0 lib/isomorfeus/puppetmaster/cookie.rb
isomorfeus-puppetmaster-0.3.5 lib/isomorfeus/puppetmaster/cookie.rb
isomorfeus-puppetmaster-0.3.4 lib/isomorfeus/puppetmaster/cookie.rb
isomorfeus-puppetmaster-0.3.3 lib/isomorfeus/puppetmaster/cookie.rb
isomorfeus-puppetmaster-0.3.2 lib/isomorfeus/puppetmaster/cookie.rb
isomorfeus-puppetmaster-0.3.1 lib/isomorfeus/puppetmaster/cookie.rb
isomorfeus-puppetmaster-0.3.0 lib/isomorfeus/puppetmaster/cookie.rb
isomorfeus-puppetmaster-0.2.9 lib/isomorfeus/puppetmaster/cookie.rb
isomorfeus-puppetmaster-0.2.8 lib/isomorfeus/puppetmaster/cookie.rb
isomorfeus-puppetmaster-0.2.7 lib/isomorfeus/puppetmaster/cookie.rb
isomorfeus-puppetmaster-0.2.6 lib/isomorfeus/puppetmaster/cookie.rb
isomorfeus-puppetmaster-0.2.5 lib/isomorfeus/puppetmaster/cookie.rb
isomorfeus-puppetmaster-0.2.4 lib/isomorfeus/puppetmaster/cookie.rb