From 68486cb7c47a2a9d251eac35adaaa3185a71cd2b Mon Sep 17 00:00:00 2001 From: Toshiaki Asai Date: Wed, 5 Nov 2014 12:58:28 +0900 Subject: プラグインがロードされた時刻を取得する機能を追加 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/plugin.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'core/plugin.rb') diff --git a/core/plugin.rb b/core/plugin.rb index 4b4c0e75..f7efa7c1 100644 --- a/core/plugin.rb +++ b/core/plugin.rb @@ -83,10 +83,14 @@ class Plugin # spec attr_accessor :spec + # 最初にプラグインがロードされた時刻(uninstallされるとリセットする) + attr_reader :defined_time + # ==== Args # [plugin_name] プラグイン名 def initialize(*args) super + @defined_time = Time.new.freeze @events = Set.new @filters = Set.new end -- cgit v1.2.3