class Siteleaf::Document

Attributes

collection_path[RW]

Public Instance Methods

collection() click to toggle source
# File lib/siteleaf/document.rb, line 10
def collection
  Collection.find(collection_identifier)
end
collection_identifier() click to toggle source
# File lib/siteleaf/document.rb, line 14
def collection_identifier
  collection_path || directory.match(/_(.*)/).try(:last)
end
create_endpoint() click to toggle source
# File lib/siteleaf/document.rb, line 6
def create_endpoint
  ::File.join("sites", site_id, "collections", collection_identifier, "documents")
end