Class: Git::CleanRemote::Cleaner

Inherits:
Thor::Shell::Color
  • Object
show all
Defined in:
lib/git-cleanremote/cleaner.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(branch, options = {}) ⇒ Cleaner

Returns a new instance of Cleaner.



5
6
7
8
9
10
11
12
13
14
15
16
17
# File 'lib/git-cleanremote/cleaner.rb', line 5

def initialize(branch, options={})
  @padding = 0
  return say ["git-cleanremote", Git::CleanRemoteVersion::STRING].join(' ') if options[:version]
  options  = options.dup
  @branch  = branch
  @remote  = options.delete :remote
  @options = options
  if options[:dryrun]
    dryrun
  else
    run
  end
end

Instance Attribute Details

#branchObject (readonly)

Returns the value of attribute branch.



3
4
5
# File 'lib/git-cleanremote/cleaner.rb', line 3

def branch
  @branch
end

#optionsObject (readonly)

Returns the value of attribute options.



3
4
5
# File 'lib/git-cleanremote/cleaner.rb', line 3

def options
  @options
end

#remoteObject (readonly)

Returns the value of attribute remote.



3
4
5
# File 'lib/git-cleanremote/cleaner.rb', line 3

def remote
  @remote
end