Class: Ace::Support::Items::Models::LoadedDocument
- Inherits:
-
Struct
- Object
- Struct
- Ace::Support::Items::Models::LoadedDocument
- Defined in:
- lib/ace/support/items/models/loaded_document.rb
Overview
Value object representing a loaded document with parsed frontmatter, body content, title, and file metadata.
Instance Attribute Summary collapse
-
#attachments ⇒ Object
Returns the value of attribute attachments.
-
#body ⇒ Object
Returns the value of attribute body.
-
#dir_path ⇒ Object
Returns the value of attribute dir_path.
-
#file_path ⇒ Object
Returns the value of attribute file_path.
-
#frontmatter ⇒ Object
Returns the value of attribute frontmatter.
-
#title ⇒ Object
Returns the value of attribute title.
Instance Method Summary collapse
-
#[](key) ⇒ Object?
Access frontmatter values by key (string or symbol).
Instance Attribute Details
#attachments ⇒ Object
Returns the value of attribute attachments
9 10 11 |
# File 'lib/ace/support/items/models/loaded_document.rb', line 9 def @attachments end |
#body ⇒ Object
Returns the value of attribute body
9 10 11 |
# File 'lib/ace/support/items/models/loaded_document.rb', line 9 def body @body end |
#dir_path ⇒ Object
Returns the value of attribute dir_path
9 10 11 |
# File 'lib/ace/support/items/models/loaded_document.rb', line 9 def dir_path @dir_path end |
#file_path ⇒ Object
Returns the value of attribute file_path
9 10 11 |
# File 'lib/ace/support/items/models/loaded_document.rb', line 9 def file_path @file_path end |
#frontmatter ⇒ Object
Returns the value of attribute frontmatter
9 10 11 |
# File 'lib/ace/support/items/models/loaded_document.rb', line 9 def frontmatter @frontmatter end |
#title ⇒ Object
Returns the value of attribute title
9 10 11 |
# File 'lib/ace/support/items/models/loaded_document.rb', line 9 def title @title end |
Instance Method Details
#[](key) ⇒ Object?
Access frontmatter values by key (string or symbol)
21 22 23 |
# File 'lib/ace/support/items/models/loaded_document.rb', line 21 def [](key) frontmatter[key.to_s] || frontmatter[key.to_sym] end |