Class: GemHadar::ChangelogConfig
- Inherits:
-
Object
- Object
- GemHadar::ChangelogConfig
- Extended by:
- DSLKit::DSLAccessor
- Defined in:
- lib/gem_hadar/changelog_config.rb
Overview
A class that encapsulates changelog configuration settings for a gem project.
This class provides a structured way to define and manage settings related to changelog generation within the GemHadar framework. It allows configuration of the changelog filename and the commit message used when adding entries.
Instance Method Summary collapse
-
#commit_message ⇒ String
The commit_message method retrieves or sets the Git commit message used when adding changelog entries.
-
#filename ⇒ String?
The filename attribute accessor for configuring the changelog filename.
-
#initialize(&block) ⇒ GemHadar::ChangelogConfig
constructor
This method creates a new instance of the ChangelogConfig class and then evaluates the provided block in the context of the new instance to configure the changelog settings.
Constructor Details
#initialize(&block) ⇒ GemHadar::ChangelogConfig
This method creates a new instance of the ChangelogConfig class and then evaluates the provided block in the context of the new instance to configure the changelog settings.
26 27 28 |
# File 'lib/gem_hadar/changelog_config.rb', line 26 def initialize(&block) instance_eval(&block) end |
Instance Method Details
#commit_message ⇒ String
The commit_message method retrieves or sets the Git commit message used when adding changelog entries.
This method serves as an accessor for the commit_message attribute within the ChangelogConfig class. When called without arguments, it returns the configured commit message, which defaults to ‘Add to changes’. When called with an argument, it sets the commit message to be used for Git operations related to changelog management.
51 |
# File 'lib/gem_hadar/changelog_config.rb', line 51 dsl_accessor :commit_message, 'Add to changes' |
#filename ⇒ String?
The filename attribute accessor for configuring the changelog filename.
This method sets up a DSL accessor for the filename attribute, which specifies the name of the changelog file to be used when generating or modifying changelog entries. It provides a way to define the location of the changelog file that will be processed during various changelog operations within the gem project.
39 |
# File 'lib/gem_hadar/changelog_config.rb', line 39 dsl_accessor :filename |