class Capybara::Apparition::Cookie

Public Class Methods

new(attributes) click to toggle source
# File lib/capybara/apparition/cookie.rb, line 5
def initialize(attributes)
  @attributes = attributes
end

Public Instance Methods

==(other) click to toggle source
Calls superclass method
# File lib/capybara/apparition/cookie.rb, line 51
def ==(other)
  return super unless other.is_a? String

  value == other
end
domain() click to toggle source
# File lib/capybara/apparition/cookie.rb, line 17
def domain
  @attributes['domain']
end
expires() click to toggle source
# File lib/capybara/apparition/cookie.rb, line 47
def expires
  Time.at @attributes['expires'] unless [nil, 0, -1].include? @attributes['expires']
end
httpOnly?() click to toggle source
# File lib/capybara/apparition/cookie.rb, line 34
def httpOnly? # rubocop:disable Naming/MethodName
  warn 'httpOnly? is deprecated, please use http_only? instead'
  http_only?
end
http_only?() click to toggle source
# File lib/capybara/apparition/cookie.rb, line 29
def http_only?
  @attributes['httpOnly']
end
Also aliased as: httponly?
httponly?()
Alias for: http_only?
name() click to toggle source
# File lib/capybara/apparition/cookie.rb, line 9
def name
  @attributes['name']
end
path() click to toggle source
# File lib/capybara/apparition/cookie.rb, line 21
def path
  @attributes['path']
end
same_site() click to toggle source
# File lib/capybara/apparition/cookie.rb, line 39
def same_site
  @attributes['sameSite']
end
samesite() click to toggle source
# File lib/capybara/apparition/cookie.rb, line 43
def samesite
  same_site
end
secure?() click to toggle source
# File lib/capybara/apparition/cookie.rb, line 25
def secure?
  @attributes['secure']
end
value() click to toggle source
# File lib/capybara/apparition/cookie.rb, line 13
def value
  @attributes['value']
end