struct

Sepia::Event

Inherits Struct < Value < Object

Represents a file system event for a Sepia object.

Constructors

new(type : EventType, object_class : String, object_id : String, path : String, object_info : PathResolver::ObjectInfo | Nil = nil)
Source

Instance methods

object(klass : Class) : Object | Nil

Load the actual Sepia object from this event

obj = event.object(MyDocument)
if obj
  puts "Loaded object: #{obj.class.name}"
end
Source
object_class
Source
object_class=(object_class : String)
Source
object_id
Source
object_id=(object_id : String)
Source
object_info
Source
object_info=(object_info : PathResolver::ObjectInfo | Nil)
Source
object_info?

Get the resolved object information for this event

Source
path
Source
path=(path : String)
Source
timestamp
Source
timestamp=(timestamp : Time)
Source
type
Source
type=(type : EventType)
Source