Exception: QiitaTrend::Error::NotExistsCacheError

Inherits:
SyntaxError
  • Object
show all
Defined in:
lib/qiita_trend/error/not_exists_cache_error.rb

Overview

キャッシュファイルが存在しない時に発生するエラークラスキャッシュファイルからトレンドを取得する時、存在しないキャッシュファイルを指定した時に発生する

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(cache) ⇒ NotExistsCacheError

コンストラクタ



14
15
16
17
# File 'lib/qiita_trend/error/not_exists_cache_error.rb', line 14

def initialize(cache)
  super
  @cache = cache
end

Instance Attribute Details

#cacheCache (readonly)



9
10
11
# File 'lib/qiita_trend/error/not_exists_cache_error.rb', line 9

def cache
  @cache
end

Instance Method Details

#messageString

エラーメッセージを返します読み込もうとしたキャッシュファイルのフルパス含んだ形でメッセージを返します



23
24
25
# File 'lib/qiita_trend/error/not_exists_cache_error.rb', line 23

def message
  "Does not exist cache file #{@cache.full_path}"
end