Class: GozapRss::ChoutiRssBase
- Inherits:
-
Object
- Object
- GozapRss::ChoutiRssBase
- Defined in:
- lib/gozap_rss/chouti_rss.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#content ⇒ Object
readonly
Returns the value of attribute content.
-
#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
#content ⇒ Object (readonly)
Returns the value of attribute content.
55 56 57 |
# File 'lib/gozap_rss/chouti_rss.rb', line 55 def content @content end |
#description ⇒ Object (readonly)
Returns the value of attribute description.
55 56 57 |
# File 'lib/gozap_rss/chouti_rss.rb', line 55 def description @description end |
#http_headers_option ⇒ Object
Returns the value of attribute http_headers_option.
56 57 58 |
# File 'lib/gozap_rss/chouti_rss.rb', line 56 def http_headers_option @http_headers_option end |
#pub_date ⇒ Object (readonly)
Returns the value of attribute pub_date.
55 56 57 |
# File 'lib/gozap_rss/chouti_rss.rb', line 55 def pub_date @pub_date end |
#title ⇒ Object (readonly)
Returns the value of attribute title.
55 56 57 |
# File 'lib/gozap_rss/chouti_rss.rb', line 55 def title @title end |
#ttl ⇒ Object (readonly)
Returns the value of attribute ttl.
55 56 57 |
# File 'lib/gozap_rss/chouti_rss.rb', line 55 def ttl @ttl end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
55 56 57 |
# File 'lib/gozap_rss/chouti_rss.rb', line 55 def url @url end |
Class Method Details
.logger ⇒ Object
27 28 29 |
# File 'lib/gozap_rss/chouti_rss.rb', line 27 def self.logger @logger || GozapRss.logger || Logger.new(STDOUT) end |
.logger=(logger) ⇒ Object
31 32 33 |
# File 'lib/gozap_rss/chouti_rss.rb', line 31 def self.logger= logger @logger = logger if logger end |
.logger_exception(e) ⇒ Object
35 36 37 38 |
# File 'lib/gozap_rss/chouti_rss.rb', line 35 def self.logger_exception e logger.error e logger.error e.backtrace end |
Instance Method Details
#log_failed(response) ⇒ Object
44 45 46 47 48 |
# File 'lib/gozap_rss/chouti_rss.rb', line 44 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
40 41 42 |
# File 'lib/gozap_rss/chouti_rss.rb', line 40 def logger self.class.logger end |
#logger_exception(e) ⇒ Object
50 51 52 |
# File 'lib/gozap_rss/chouti_rss.rb', line 50 def logger_exception e self.class.logger_exception e end |