Class: LlmDocsBuilder::ParsedContent
- Inherits:
-
Object
- Object
- LlmDocsBuilder::ParsedContent
- Defined in:
- lib/llm_docs_builder/parser.rb
Overview
Represents parsed llms.txt content with structured access to sections
Provides convenient access to parsed llms.txt sections including title, description, and link collections.
Instance Attribute Summary collapse
-
#sections ⇒ Hash
readonly
The parsed sections hash.
Instance Method Summary collapse
-
#description ⇒ String?
Get the project description.
-
#documentation_links ⇒ Array<Hash>
Get documentation links.
-
#example_links ⇒ Array<Hash>
Get example links.
-
#initialize(sections) ⇒ ParsedContent
constructor
Initialize parsed content.
-
#optional_links ⇒ Array<Hash>
Get optional links.
-
#title ⇒ String?
Get the project title.
Constructor Details
#initialize(sections) ⇒ ParsedContent
Initialize parsed content
126 127 128 |
# File 'lib/llm_docs_builder/parser.rb', line 126 def initialize(sections) @sections = sections end |
Instance Attribute Details
#sections ⇒ Hash (readonly)
Returns the parsed sections hash.
121 122 123 |
# File 'lib/llm_docs_builder/parser.rb', line 121 def sections @sections end |
Instance Method Details
#description ⇒ String?
Get the project description
140 141 142 |
# File 'lib/llm_docs_builder/parser.rb', line 140 def description sections[:description] end |
#documentation_links ⇒ Array<Hash>
Get documentation links
147 148 149 |
# File 'lib/llm_docs_builder/parser.rb', line 147 def documentation_links sections[:documentation] || [] end |
#example_links ⇒ Array<Hash>
Get example links
154 155 156 |
# File 'lib/llm_docs_builder/parser.rb', line 154 def example_links sections[:examples] || [] end |
#optional_links ⇒ Array<Hash>
Get optional links
161 162 163 |
# File 'lib/llm_docs_builder/parser.rb', line 161 def optional_links sections[:optional] || [] end |
#title ⇒ String?
Get the project title
133 134 135 |
# File 'lib/llm_docs_builder/parser.rb', line 133 def title sections[:title] end |