lib/metric_fu.rb in metric_fu-4.9.0 vs lib/metric_fu.rb in metric_fu-4.10.0
- old
+ new
@@ -26,9 +26,37 @@
def report_name=(report_name)
@report_name = report_name
end
+ # The time at analyzed code state
+ def report_time
+ Time.now
+ end
+
+ def report_date_string
+ report_time.strftime("%Y%m%d")
+ end
+
+ # @return [String]
+ # @example '20140323'
+ # Used to uniquely identify reports
+ # as a sortable reference to when the report
+ # was generated
+ def report_id
+ report_date_string
+ end
+
+ # Non-date-specific; Used to uniquely identify a report run
+ def report_fingerprint
+ report_time.to_i.to_s
+ end
+
+ # The time the metrics are generated
+ def current_time
+ Time.now.localtime
+ end
+
def root_dir
APP_ROOT
end
def lib_dir
LIB_ROOT