Class: Zypper::Onlinesearch::Request::Page::Opensuse

Inherits:
PageRequest
  • Object
show all
Defined in:
lib/zypper/onlinesearch/request.rb

Overview

Handle the page on openSUSE.

Constant Summary collapse

URL =
"https://software.opensuse.org/package/"

Constants inherited from PageRequest

PageRequest::USER_AGENT

Instance Attribute Summary

Attributes inherited from PageRequest

#page

Instance Method Summary collapse

Methods inherited from PageRequest

#available?, #cache!, #cache_time, #forbidden?, #not_found?, #redirected?, #redirected_to, #status, #timeout?, #to_data

Constructor Details

#initialize(query, cache, timeout, cookies = []) ⇒ Opensuse

Returns a new instance of Opensuse.



180
181
182
183
# File 'lib/zypper/onlinesearch/request.rb', line 180

def initialize(query, cache, timeout, cookies = [])
  super query, cache, timeout,
        cookies << "baseproject=ALL;search_devel=true;search_debug=false;search_lang=false"
end

Instance Method Details

#uriObject



185
186
187
# File 'lib/zypper/onlinesearch/request.rb', line 185

def uri
  URI(URL + URI.encode(@query))
end