Sha256: 40676e886c792aa3af27819737fc013241cd8c9e7eaa2abb11fec981d1d10d10
Contents?: true
Size: 665 Bytes
Versions: 19
Compression:
Stored size: 665 Bytes
Contents
# -*- coding: utf-8 -*- # # Copyright 2013 whiteleaf. All rights reserved. # class HotentryManager attr_reader :hotentries def initialize inv = Inventory.load("local_setting") self.enable = inv["hotentry"] self.auto_mail = inv["hotentry.auto-mail"] self.hotentries = {} end def connect(downloader) return unless enable? downloader.on(:newarrival, &method(:store_entry)) end def enable? enable end def auto_mail? auto_mail end private attr_accessor :enable, :auto_mail attr_writer :hotentries def store_entry(hash) entry = hotentries[hash[:id]] ||= [] entry << hash[:subtitle_info] end end
Version data entries
19 entries across 19 versions & 1 rubygems