Sha256: 7e2b39ec6e3a3897f5ce46002f4154943ee152f1911cb5b4e1ff6901dff205f2
Contents?: true
Size: 682 Bytes
Versions: 13
Compression:
Stored size: 682 Bytes
Contents
module Einhorn::Event module Persistent @@persistent = {} def self.included(other) @@persistent[other.to_s] = other end def self.from_state(state) klass_name = state[:class] if klass = @@persistent[klass_name] klass.from_state(state) else Einhorn.log_error("Unrecognized persistent descriptor class #{klass_name.inspect}. Ignoring. This most likely indicates that your Einhorn version has upgraded. Everything should still be working, but it may be worth a restart.") nil end end def self.persistent?(descriptor) @@persistent.values.any? {|klass| descriptor.kind_of?(klass)} end end end
Version data entries
13 entries across 13 versions & 1 rubygems