Class: DiffNews::NZZ

Inherits:
Service show all
Defined in:
lib/news_service/nzz.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) ⇒ NZZ

Returns a new instance of NZZ.



6
7
8
# File 'lib/news_service/nzz.rb', line 6

def initialize url
  super url
end

Class Method Details

.base_urlObject



14
15
16
# File 'lib/news_service/nzz.rb', line 14

def self.base_url
  'https://www.nzz.ch/'
end

.providerObject



10
11
12
# File 'lib/news_service/nzz.rb', line 10

def self.provider
  'nzz.ch'
end

.valid_urlObject



18
19
20
# File 'lib/news_service/nzz.rb', line 18

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