Class: Feedlrop::Dbutil::FeedlropMgr
- Inherits:
-
Object
- Object
- Feedlrop::Dbutil::FeedlropMgr
- Extended by:
- Forwardable
- Defined in:
- lib/feedlrop/dbutil/feedlropmgr.rb
Instance Method Summary collapse
- #add(category, url, unread_count) ⇒ Object
- #find(id) ⇒ Object
-
#initialize(register_time) ⇒ FeedlropMgr
constructor
A new instance of FeedlropMgr.
Constructor Details
#initialize(register_time) ⇒ FeedlropMgr
Returns a new instance of FeedlropMgr.
17 18 19 20 |
# File 'lib/feedlrop/dbutil/feedlropmgr.rb', line 17 def initialize(register_time) @register_time = register_time @ct = Countdatetime.create( countdatetime: @register_time ) end |
Instance Method Details
#add(category, url, unread_count) ⇒ Object
22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/feedlrop/dbutil/feedlropmgr.rb', line 22 def add( category, url , unread_count ) begin uf = Unreadfeed.create( time_id: @ct.id , category: category , url: url , unread_count: unread_count , start_datetime: @register_time ) rescue => ex p ex.class p ex. pp ex.backtrace end uf end |
#find(id) ⇒ Object
34 35 36 |
# File 'lib/feedlrop/dbutil/feedlropmgr.rb', line 34 def find(id) Unreadfeed.find(id) end |