Class: Git::Tagger

Inherits:
Object
  • Object
show all
Includes:
CLI, Commands
Defined in:
lib/git/tagger.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Commands

#assert_is_git_repo, #get_branch, #get_tags, #is_git_repo?, #next_version, #valid_version_regexp

Methods included from CLI

#ask, #error, #stars, #warn, #wrap

Constructor Details

#initialize(options) ⇒ Tagger

Returns a new instance of Tagger.



7
8
9
# File 'lib/git/tagger.rb', line 7

def initialize(options)
  @options = options
end

Instance Attribute Details

#optionsObject (readonly)

Returns the value of attribute options.



6
7
8
# File 'lib/git/tagger.rb', line 6

def options
  @options
end

Instance Method Details

#tag!Object



11
12
13
14
15
16
17
18
# File 'lib/git/tagger.rb', line 11

def tag!
  assert_is_git_repo
  begin
    fetch_tags
    tag_next_version(options)
    push_tags
  end
end