Class: GozapRss::ChoutiRssBase
- Inherits:
-
Object
- Object
- GozapRss::ChoutiRssBase
- Defined in:
- lib/gozap_rss/chouti_rss.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#http_headers_option ⇒ Object
Returns the value of attribute http_headers_option.
-
#pub_date ⇒ Object
readonly
Returns the value of attribute pub_date.
-
#title ⇒ Object
readonly
Returns the value of attribute title.
-
#ttl ⇒ Object
readonly
Returns the value of attribute ttl.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#description ⇒ Object (readonly)
Returns the value of attribute description.
35 36 37 |
# File 'lib/gozap_rss/chouti_rss.rb', line 35 def description @description end |
#http_headers_option ⇒ Object
Returns the value of attribute http_headers_option.
36 37 38 |
# File 'lib/gozap_rss/chouti_rss.rb', line 36 def http_headers_option @http_headers_option end |
#pub_date ⇒ Object (readonly)
Returns the value of attribute pub_date.
35 36 37 |
# File 'lib/gozap_rss/chouti_rss.rb', line 35 def pub_date @pub_date end |
#title ⇒ Object (readonly)
Returns the value of attribute title.
35 36 37 |
# File 'lib/gozap_rss/chouti_rss.rb', line 35 def title @title end |
#ttl ⇒ Object (readonly)
Returns the value of attribute ttl.
35 36 37 |
# File 'lib/gozap_rss/chouti_rss.rb', line 35 def ttl @ttl end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
35 36 37 |
# File 'lib/gozap_rss/chouti_rss.rb', line 35 def url @url end |
Class Method Details
.logger ⇒ Object
7 8 9 |
# File 'lib/gozap_rss/chouti_rss.rb', line 7 def self.logger @logger || GozapRss.logger || Logger.new(STDOUT) end |
.logger=(logger) ⇒ Object
11 12 13 |
# File 'lib/gozap_rss/chouti_rss.rb', line 11 def self.logger= logger @logger = logger if logger end |
.logger_exception(e) ⇒ Object
15 16 17 18 |
# File 'lib/gozap_rss/chouti_rss.rb', line 15 def self.logger_exception e logger.error e logger.error e.backtrace end |
Instance Method Details
#log_failed(response) ⇒ Object
24 25 26 27 28 |
# File 'lib/gozap_rss/chouti_rss.rb', line 24 def log_failed(response) msg = "#{response.code} URL: #{response.request.url} PARAMS: #{response.request.params.to_s} in #{response.time}s FAILED : #{response.} BODY: #{response.body}" logger.error(msg) end |
#logger ⇒ Object
20 21 22 |
# File 'lib/gozap_rss/chouti_rss.rb', line 20 def logger self.class.logger end |
#logger_exception(e) ⇒ Object
30 31 32 |
# File 'lib/gozap_rss/chouti_rss.rb', line 30 def logger_exception e self.class.logger_exception e end |