Class: Architext::Bundle

Inherits:
Object
  • Object
show all
Defined in:
lib/architext/bundle.rb

Instance Method Summary collapse

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_markdownObject



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