Class: TivoHMO::TVDBHelper
- Inherits:
-
Object
- Object
- TivoHMO::TVDBHelper
- Includes:
- GemLogger::LoggerSupport, Singleton
- Defined in:
- lib/tivohmo/tvdb_helper.rb
Instance Method Summary collapse
- #find_by_id(series_id) ⇒ Object
-
#initialize ⇒ TVDBHelper
constructor
A new instance of TVDBHelper.
Constructor Details
#initialize ⇒ TVDBHelper
9 10 11 12 |
# File 'lib/tivohmo/tvdb_helper.rb', line 9 def initialize @client = Tvdbr::Client.new('4A7C459A8771A96D') @cache = {} end |
Instance Method Details
#find_by_id(series_id) ⇒ Object
14 15 16 |
# File 'lib/tivohmo/tvdb_helper.rb', line 14 def find_by_id(series_id) @cache[series_id] ||= @client.find_series_by_id(series_id) rescue nil end |