Class: DiffNews::MockService

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

Instance Attribute Summary collapse

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) ⇒ MockService

Returns a new instance of MockService.



12
13
14
15
16
17
18
# File 'lib/news_service/mock.rb', line 12

def initialize url
  @title = "Mock Title"
  @teaser = "Mock Teaser"
  @text = "Mock Text"

  super url
end

Instance Attribute Details

#teaserObject (readonly)

Returns the value of attribute teaser.



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

def teaser
  @teaser
end

#textObject (readonly)

Returns the value of attribute text.



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

def text
  @text
end

#titleObject (readonly)

Returns the value of attribute title.



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

def title
  @title
end

Class Method Details

.base_urlObject



24
25
26
# File 'lib/news_service/mock.rb', line 24

def self.base_url
  'none'
end

.providerObject



20
21
22
# File 'lib/news_service/mock.rb', line 20

def self.provider
  'mock_service'
end

.valid_urlObject



28
29
30
# File 'lib/news_service/mock.rb', line 28

def self.valid_url
  /mock_me/
end

Instance Method Details

#load_documentObject



32
33
# File 'lib/news_service/mock.rb', line 32

def load_document
end