Class: MultiGit::Ref::RecklessUpdater

Inherits:
Updater
  • Object
show all
Defined in:
lib/multi_git/ref.rb

Constant Summary collapse

SUBCLASSES =
Hash.new{|hsh,key|
  hsh[key] = Class.new(self) do
    @updater = key
  end
}

Class Attribute Summary collapse

Attributes inherited from Updater

#ref, #target

Instance Method Summary collapse

Methods inherited from Updater

#destroy!, #initialize, #name, #repository

Constructor Details

This class inherits a constructor from MultiGit::Ref::Updater

Class Attribute Details

.updaterObject (readonly)

Returns the value of attribute updater.



228
229
230
# File 'lib/multi_git/ref.rb', line 228

def updater
  @updater
end

Instance Method Details

#update(new) ⇒ Object



237
238
239
240
241
242
243
244
# File 'lib/multi_git/ref.rb', line 237

def update( new )
  pu = self.class.updater.new( ref )
  begin
    pu.update( new )
  ensure
    pu.destroy!
  end
end