Class: Schmersion::Version

Inherits:
Object
  • Object
show all
Defined in:
lib/schmersion/version.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(repo, version, commit_parser) ⇒ Version

Returns a new instance of Version.



9
10
11
12
13
# File 'lib/schmersion/version.rb', line 9

def initialize(repo, version, commit_parser)
  @repo = repo
  @version = version
  @commit_parser = commit_parser
end

Instance Attribute Details

#commit_parserObject (readonly)

Returns the value of attribute commit_parser.



7
8
9
# File 'lib/schmersion/version.rb', line 7

def commit_parser
  @commit_parser
end

#versionObject (readonly)

Returns the value of attribute version.



6
7
8
# File 'lib/schmersion/version.rb', line 6

def version
  @version
end

Instance Method Details

#commit_messageObject



27
28
29
# File 'lib/schmersion/version.rb', line 27

def commit_message
  "chore(release): #{version}"
end

#commitsObject



15
16
17
# File 'lib/schmersion/version.rb', line 15

def commits
  @commit_parser.commits
end

#end_commitObject



23
24
25
# File 'lib/schmersion/version.rb', line 23

def end_commit
  @commit_parser.end_commit
end

#start_commitObject



19
20
21
# File 'lib/schmersion/version.rb', line 19

def start_commit
  @commit_parser.start_commit
end