Class: DiffNews::MockService
- Defined in:
- lib/news_service/mock.rb
Instance Attribute Summary collapse
-
#teaser ⇒ Object
readonly
Returns the value of attribute teaser.
-
#text ⇒ Object
readonly
Returns the value of attribute text.
-
#title ⇒ Object
readonly
Returns the value of attribute title.
Attributes inherited from Service
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(url) ⇒ MockService
constructor
A new instance of MockService.
- #load_document ⇒ Object
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
#teaser ⇒ Object (readonly)
Returns the value of attribute teaser.
10 11 12 |
# File 'lib/news_service/mock.rb', line 10 def @teaser end |
#text ⇒ Object (readonly)
Returns the value of attribute text.
10 11 12 |
# File 'lib/news_service/mock.rb', line 10 def text @text end |
#title ⇒ Object (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_url ⇒ Object
24 25 26 |
# File 'lib/news_service/mock.rb', line 24 def self.base_url 'none' end |
.provider ⇒ Object
20 21 22 |
# File 'lib/news_service/mock.rb', line 20 def self.provider 'mock_service' end |
.valid_url ⇒ Object
28 29 30 |
# File 'lib/news_service/mock.rb', line 28 def self.valid_url /mock_me/ end |
Instance Method Details
#load_document ⇒ Object
32 33 |
# File 'lib/news_service/mock.rb', line 32 def load_document end |