Class: DiffNews::Tagesanzeiger

Inherits:
Service
  • Object
show all
Defined in:
lib/news_service/tagesanzeiger.rb

Instance Attribute Summary

Attributes inherited from Service

#history

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Service

#base_url, create, #current_revision, #encoding, #normalize_text, #provider, register_service, services, store_class=, #strip_html

Constructor Details

#initialize(url) ⇒ Tagesanzeiger

Returns a new instance of Tagesanzeiger.



7
8
9
# File 'lib/news_service/tagesanzeiger.rb', line 7

def initialize url
  super normalize_url(url)
end

Class Method Details

.base_urlObject



15
16
17
# File 'lib/news_service/tagesanzeiger.rb', line 15

def self.base_url
  'http://www.tagesanzeiger.ch/'
end

.providerObject



11
12
13
# File 'lib/news_service/tagesanzeiger.rb', line 11

def self.provider
  'tagesanzeiger.ch'
end

.valid_urlObject



19
20
21
# File 'lib/news_service/tagesanzeiger.rb', line 19

def self.valid_url
  /^https?:\/\/(www.)?tagesanzeiger.ch/
end