Module: MonkeyPatch
- Defined in:
- lib/monkey_patch.rb,
lib/monkey_patch/railtie.rb
Defined Under Namespace
Classes: Error, MissingGem, Patcher, Railtie, UpdateRequired
Class Attribute Summary collapse
-
.logger ⇒ Object
Returns the value of attribute logger.
Class Method Summary collapse
Class Attribute Details
.logger ⇒ Object
Returns the value of attribute logger.
47 48 49 |
# File 'lib/monkey_patch.rb', line 47 def logger @logger end |
Class Method Details
.for(gem_name, version, &block) ⇒ Object
49 50 51 52 53 54 55 56 |
# File 'lib/monkey_patch.rb', line 49 def for(gem_name, version, &block) gem = find_gem(gem_name) raise MissingGem.new(gem_name, version) if gem.nil? raise UpdateRequired.new(gem, version) if gem.version.to_s != version block.call(MonkeyPatch::Patcher.new(gem_name, version)) end |