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
128 129 130 |
# File 'lib/llm_docs_builder/parser.rb', line 128 def initialize(sections) @sections = sections end |
Instance Attribute Details
#sections ⇒ Hash (readonly)
Returns the parsed sections hash.
123 124 125 |
# File 'lib/llm_docs_builder/parser.rb', line 123 def sections @sections end |
Instance Method Details
#description ⇒ String?
Get the project description
142 143 144 |
# File 'lib/llm_docs_builder/parser.rb', line 142 def description sections[:description] end |
#documentation_links ⇒ Array<Hash>
Get documentation links
149 150 151 |
# File 'lib/llm_docs_builder/parser.rb', line 149 def documentation_links sections[:documentation] || [] end |
#example_links ⇒ Array<Hash>
Get example links
156 157 158 |
# File 'lib/llm_docs_builder/parser.rb', line 156 def example_links sections[:examples] || [] end |
#optional_links ⇒ Array<Hash>
Get optional links
163 164 165 |
# File 'lib/llm_docs_builder/parser.rb', line 163 def optional_links sections[:optional] || [] end |
#title ⇒ String?
Get the project title
135 136 137 |
# File 'lib/llm_docs_builder/parser.rb', line 135 def title sections[:title] end |