class Observed::FakeSystem
An yet another cushion from the deprecated plugin interface to the new plugin interface
Public Class Methods
new(args)
click to toggle source
# File lib/observed/observed_task_factory.rb, line 10 def initialize(args) @time = args[:time] || Time.now end
Public Instance Methods
now()
click to toggle source
# File lib/observed/observed_task_factory.rb, line 36 def now @time end
report(tag, time, data=nil)
click to toggle source
# File lib/observed/observed_task_factory.rb, line 14 def report(tag, time, data=nil) options = nil if tag.is_a?(::Hash) data = tag options = time || {} tag = nil elsif tag.is_a?(String) && time.is_a?(::Hash) options = data data = time else options = {tag: tag, time: time} end options ||= {} options[:tag] ||= tag options[:time] ||= now @reported = [data, options] end
reported()
click to toggle source
# File lib/observed/observed_task_factory.rb, line 32 def reported @reported end