Class: GemComet::Changelog::Generator

Inherits:
ServiceAbstract show all
Defined in:
lib/gem_comet/changelog/generator.rb

Overview

Generates changelog from git log

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from ServiceAbstract

call

Constructor Details

#initialize(version:, title: nil) ⇒ Generator

Returns a new instance of Generator.

Parameters:

  • version (String)

    The end of version number to create a changelog.

  • title (String) (defaults to: nil)

    Next version of your gem



11
12
13
14
15
# File 'lib/gem_comet/changelog/generator.rb', line 11

def initialize(version:, title: nil)
  @version = version
  @title = title || version
  @origin_url = RepositoryUrl.call
end

Instance Attribute Details

#origin_urlObject (readonly)

Returns the value of attribute origin_url.



7
8
9
# File 'lib/gem_comet/changelog/generator.rb', line 7

def origin_url
  @origin_url
end

#titleObject (readonly)

Returns the value of attribute title.



7
8
9
# File 'lib/gem_comet/changelog/generator.rb', line 7

def title
  @title
end

#versionObject (readonly)

Returns the value of attribute version.



7
8
9
# File 'lib/gem_comet/changelog/generator.rb', line 7

def version
  @version
end