Class: StructuredChangelog::ReleasePreview

Inherits:
Object
  • Object
show all
Defined in:
lib/structured_changelog/release_preview.rb

Instance Method Summary collapse

Constructor Details

#initialize(changelog:, repo:) ⇒ ReleasePreview

Returns a new instance of ReleasePreview.



6
7
8
9
# File 'lib/structured_changelog/release_preview.rb', line 6

def initialize(changelog:, repo:)
  @changelog = changelog
  @repo      = repo
end

Instance Method Details

#empty?Boolean

Returns:

  • (Boolean)


15
16
17
# File 'lib/structured_changelog/release_preview.rb', line 15

def empty?
  release_notes.empty?
end

#to_sObject



11
12
13
# File 'lib/structured_changelog/release_preview.rb', line 11

def to_s
  "## RELEASE #{new_version}\n\n#{release_notes}"
end