Class: Instapaper::QLineParser

Inherits:
Object
  • Object
show all
Defined in:
lib/instapaper/http/qline_parser.rb

Class Method Summary collapse

Class Method Details

.parse(response) ⇒ Object


3
4
5
6
7
# File 'lib/instapaper/http/qline_parser.rb', line 3

def self.parse(response)
  values = response.split('&').map { |part| part.split('=') }.flatten
  values.unshift('error') if values.length == 1
  Hash[*values]
end