struct
Sepia::Event
- Sepia::Event
- Struct
- Value
- Object
Overview
Represents a file system event for a Sepia object.
Defined in:
sepia/watcher.crConstructors
Instance Method Summary
-
#object(klass : Class) : Object | Nil
Load the actual Sepia object from this event
- #object_class : String
- #object_class=(object_class : String)
- #object_id : String
- #object_id=(object_id : String)
- #object_info : PathResolver::ObjectInfo | Nil
- #object_info=(object_info : PathResolver::ObjectInfo | Nil)
-
#object_info? : Sepia::PathResolver::ObjectInfo?
Get the resolved object information for this event
- #path : String
- #path=(path : String)
- #timestamp : Time
- #timestamp=(timestamp : Time)
- #type : EventType
- #type=(type : EventType)
Constructor Detail
def self.new(type : EventType, object_class : String, object_id : String, path : String, object_info : PathResolver::ObjectInfo | Nil = nil)
#
Instance Method Detail
Load the actual Sepia object from this event
obj = event.object(MyDocument)
if obj
puts "Loaded object: #{obj.class.name}"
end
def object_info? : Sepia::PathResolver::ObjectInfo?
#
Get the resolved object information for this event