Class: MonkeyPatch::Patcher

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(gem, version) ⇒ Patcher

Returns a new instance of Patcher.



36
37
38
39
# File 'lib/monkey_patch.rb', line 36

def initialize(gem, version)
  @gem     = gem
  @version = version
end

Instance Attribute Details

#gemObject (readonly)

Returns the value of attribute gem.



34
35
36
# File 'lib/monkey_patch.rb', line 34

def gem
  @gem
end

#versionObject (readonly)

Returns the value of attribute version.



34
35
36
# File 'lib/monkey_patch.rb', line 34

def version
  @version
end

Instance Method Details

#announce(patch) ⇒ Object



41
42
43
# File 'lib/monkey_patch.rb', line 41

def announce(patch)
  MonkeyPatch.logger && MonkeyPatch.logger.info("MonkeyPatch (#{gem} v#{version}): #{patch}")
end