Class: Architext::Bundle
- Inherits:
-
Object
- Object
- Architext::Bundle
- Defined in:
- lib/architext/bundle.rb
Instance Method Summary collapse
-
#initialize(files) ⇒ Bundle
constructor
A new instance of Bundle.
- #to_markdown ⇒ Object
Constructor Details
#initialize(files) ⇒ Bundle
Returns a new instance of Bundle.
7 8 9 |
# File 'lib/architext/bundle.rb', line 7 def initialize(files) @files = files end |
Instance Method Details
#to_markdown ⇒ Object
11 12 13 14 15 16 17 18 |
# File 'lib/architext/bundle.rb', line 11 def to_markdown sections = @files.map do |file| normalized = file.content.to_s.chomp "## File: #{file.path}\n\n#{normalized}" end "# Context Bundle\n\n#{sections.join("\n\n---\n\n")}\n" end |