Class: Giblish::GitSummaryIndexBuilder

Inherits:
Object
  • Object
show all
Defined in:
lib/giblish/buildindex.rb

Overview

Builds an index page with a summary of what branches have been generated

Instance Method Summary collapse

Constructor Details

#initialize(repo, branches, tags) ⇒ GitSummaryIndexBuilder

Returns a new instance of GitSummaryIndexBuilder.



395
396
397
398
399
400
# File 'lib/giblish/buildindex.rb', line 395

def initialize(repo, branches, tags)
  @branches = branches
  @tags = tags
  @git_repo = repo
  @repo_url = repo.remote.url
end

Instance Method Details

#sourceObject



402
403
404
405
406
407
408
409
# File 'lib/giblish/buildindex.rb', line 402

def source
  <<~ADOC_SRC
    #{generate_header}
    #{generate_branch_info}
    #{generate_tag_info}
    #{generate_footer}
  ADOC_SRC
end