Sha256: 71c8ad1c5fe4f3f5bc92bcc8aa4482fb470d5c7dbc2104dc811fb2bf89fb7df4

Contents?: true

Size: 605 Bytes

Versions: 5

Compression:

Stored size: 605 Bytes

Contents

# frozen_string_literal: true

module Capybara::Poltergeist
  class Cookie
    def initialize(attributes)
      @attributes = attributes
    end

    def name
      @attributes['name']
    end

    def value
      @attributes['value']
    end

    def domain
      @attributes['domain']
    end

    def path
      @attributes['path']
    end

    def secure?
      @attributes['secure']
    end

    def httponly?
      @attributes['httponly']
    end

    def samesite
      @attributes['samesite']
    end

    def expires
      Time.at @attributes['expiry'] if @attributes['expiry']
    end
  end
end

Version data entries

5 entries across 4 versions & 2 rubygems

Version Path
trusty-cms-7.0.9.1 vendor/bundle/ruby/3.1.0/gems/poltergeist-1.18.1/lib/capybara/poltergeist/cookie.rb
trusty-cms-7.0.9.1 vendor/bundle/ruby/3.3.0/gems/poltergeist-1.18.1/lib/capybara/poltergeist/cookie.rb
poltergeist-1.18.1 lib/capybara/poltergeist/cookie.rb
poltergeist-1.18.0 lib/capybara/poltergeist/cookie.rb
poltergeist-1.17.0 lib/capybara/poltergeist/cookie.rb