Class: GozapRss::ChoutiRssItem

Inherits:
ChoutiRssBase show all
Defined in:
lib/gozap_rss/chouti_rss.rb

Instance Attribute Summary

Attributes inherited from ChoutiRssBase

#content, #description, #http_headers_option, #pub_date, #title, #ttl, #url

Instance Method Summary collapse

Methods inherited from ChoutiRssBase

#log_failed, logger, #logger, logger=, logger_exception, #logger_exception

Constructor Details

#initialize(item) ⇒ ChoutiRssItem

Returns a new instance of ChoutiRssItem.



253
254
255
256
257
258
259
260
261
262
# File 'lib/gozap_rss/chouti_rss.rb', line 253

def initialize item
  @title = item.title.to_s.html_format
  @description = item.description.to_s.html_format
  @url = item.link.to_s.strip
  unless validate
    logger.error "parser item error -- title=>#{@title},  url=>#{@url}"
    return nil
  end
  self
end