Sha256: 4f1966d08c2e8db4f2462a8ba71255d16c32ee6326cb9e363118430eb595a277
Contents?: true
Size: 579 Bytes
Versions: 35
Compression:
Stored size: 579 Bytes
Contents
module RestCore EventStruct = Struct.new(:duration, :message) unless RestCore.const_defined?(:EventStruct) class Event < EventStruct # self.class.name[/(?<=::)\w+$/] if RUBY_VERSION >= '1.9.2' def name; self.class.name[/::(\w+)$/, 1] ; end def to_s; "spent #{duration} #{name} #{message}"; end end class Event::MultiDone < Event; end class Event::Requested < Event; end class Event::CacheHit < Event; end class Event::CacheCleared < Event; end class Event::Failed < Event; end class Event::WithHeader < Event; end end
Version data entries
35 entries across 35 versions & 1 rubygems