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.
10 11 12 13 14 15 |
# File 'lib/command/update/hotentry_manager.rb', line 10 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.
8 9 10 |
# File 'lib/command/update/hotentry_manager.rb', line 8 def hotentries @hotentries end |
Instance Method Details
#auto_mail? ⇒ Boolean
26 27 28 |
# File 'lib/command/update/hotentry_manager.rb', line 26 def auto_mail? auto_mail end |
#connect(downloader) ⇒ Object
17 18 19 20 |
# File 'lib/command/update/hotentry_manager.rb', line 17 def connect(downloader) return unless enable? downloader.on(:newarrival, &method(:store_entry)) end |
#enable? ⇒ Boolean
22 23 24 |
# File 'lib/command/update/hotentry_manager.rb', line 22 def enable? enable end |