struct Sepia::PathResolver::ObjectInfo

Overview

Information about a resolved Sepia object path

Defined in:

sepia/path_resolver.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(class_name : String, object_id : String, full_path : String, relative_path : String, storage_path : String) #

[View source]

Instance Method Detail

def class_name : String #

[View source]
def class_name=(class_name : String) #

[View source]
def container? : Bool #

Check if this path represents a Container object


[View source]
def full_path : String #

[View source]
def full_path=(full_path : String) #

[View source]
def object(klass : Class) : Object | Nil #

Load the actual Sepia object from storage using a given class

obj = info.object(TestDocument)
if obj
  puts "Loaded #{obj.class.name} with ID #{obj.sepia_id}"
end

[View source]
def object_id : String #

[View source]
def object_id=(object_id : String) #

[View source]
def relative_path : String #

[View source]
def relative_path=(relative_path : String) #

[View source]
def serializable? : Bool #

Check if this path represents a Serializable object


[View source]
def storage_path : String #

[View source]
def storage_path=(storage_path : String) #

[View source]