class Lookbook::PreviewEntity

def initialize(code_object)

Other tags:
    Api: - private
def initialize(code_object)
  @code_object = code_object
  @preview_class = code_object.path.constantize
  @file_path = Pathname(code_object.file)
  @base_directories = Engine.preview_paths
  cleaned_path = preview_class.name.underscore.strip
    .gsub(/(_component_preview|_preview)(\..+)?$/, "")
    .gsub(/\/(component_preview|preview|component)(\..+)?$/, "")
  @lookup_path = PathUtils.to_lookup_path(cleaned_path)
end