Module: Iconoclasm::Downloader
- Included in:
- Favicon
- Defined in:
- lib/iconoclasm/downloader.rb
Constant Summary collapse
- @@user_agent =
%Q{Mozilla/5.0 (compatible; Iconoclasm/#{Iconoclasm.version}; +http://github.com/sander6/iconoclasm)}
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.user_agent ⇒ Object
10 11 12 |
# File 'lib/iconoclasm/downloader.rb', line 10 def self.user_agent @@user_agent end |
.user_agent=(agent) ⇒ Object
6 7 8 |
# File 'lib/iconoclasm/downloader.rb', line 6 def self.user_agent=(agent) @@user_agent = agent end |
Instance Method Details
#get(url) ⇒ Object
18 19 20 21 22 |
# File 'lib/iconoclasm/downloader.rb', line 18 def get(url) c = curl(url) c.http_get c end |
#head(url) ⇒ Object
24 25 26 27 28 |
# File 'lib/iconoclasm/downloader.rb', line 24 def head(url) c = curl(url) c.http_head c end |
#user_agent ⇒ Object
14 15 16 |
# File 'lib/iconoclasm/downloader.rb', line 14 def user_agent @@user_agent end |