Class: RestCore::Event

Inherits:
EventStruct show all
Defined in:
lib/rest-core/event.rb

Direct Known Subclasses

CacheCleared, CacheHit, Failed, MultiDone, Requested, WithHeader

Defined Under Namespace

Classes: CacheCleared, CacheHit, Failed, MultiDone, Requested, WithHeader

Instance Attribute Summary

Attributes inherited from EventStruct

#duration, #message

Instance Method Summary collapse

Instance Method Details

#nameObject

self.class.name if RUBY_VERSION >= ‘1.9.2’



8
# File 'lib/rest-core/event.rb', line 8

def name; self.class.name[/::(\w+)$/u, 1]        ; end

#to_sObject



9
# File 'lib/rest-core/event.rb', line 9

def to_s; "spent #{duration} #{name} #{message}"; end