Class: HotentryManager
- Inherits:
-
Object
- Object
- HotentryManager
- Defined in:
- lib/command/update/hotentry_manager.rb
Overview
Copyright 2013 whiteleaf. All rights reserved.
Instance Attribute Summary collapse
-
#hotentries ⇒ Object
readonly
Returns the value of attribute hotentries.
Instance Method Summary collapse
- #auto_mail? ⇒ Boolean
- #connect(downloader) ⇒ Object
- #enable? ⇒ Boolean
-
#initialize ⇒ HotentryManager
constructor
A new instance of HotentryManager.
Constructor Details
#initialize ⇒ HotentryManager
Returns a new instance of HotentryManager.
9 10 11 12 13 14 |
# File 'lib/command/update/hotentry_manager.rb', line 9 def initialize inv = Inventory.load("local_setting") self.enable = inv["hotentry"] self.auto_mail = inv["hotentry.auto-mail"] self.hotentries = {} end |
Instance Attribute Details
#hotentries ⇒ Object
Returns the value of attribute hotentries.
7 8 9 |
# File 'lib/command/update/hotentry_manager.rb', line 7 def hotentries @hotentries end |
Instance Method Details
#auto_mail? ⇒ Boolean
25 26 27 |
# File 'lib/command/update/hotentry_manager.rb', line 25 def auto_mail? auto_mail end |
#connect(downloader) ⇒ Object
16 17 18 19 |
# File 'lib/command/update/hotentry_manager.rb', line 16 def connect(downloader) return unless enable? downloader.on(:newarrival, &method(:store_entry)) end |
#enable? ⇒ Boolean
21 22 23 |
# File 'lib/command/update/hotentry_manager.rb', line 21 def enable? enable end |