Class: Jets::CLI::Curl::Adapter::Cookies::Parser

Inherits:
Object
  • Object
show all
Defined in:
lib/jets/cli/curl/adapter/cookies/parser.rb

Instance Method Summary collapse

Constructor Details

#initialize(cookie_string) ⇒ Parser

Returns a new instance of Parser.



3
4
5
# File 'lib/jets/cli/curl/adapter/cookies/parser.rb', line 3

def initialize(cookie_string)
  @cookie_string = cookie_string
end

Instance Method Details

#parseObject



7
8
9
10
11
12
13
# File 'lib/jets/cli/curl/adapter/cookies/parser.rb', line 7

def parse
  if @cookie_string.include?("=")
    parse_inline_cookies
  else
    parse_cookies_from_file
  end
end