Add a helper utility for setting up the mapper

This commit is contained in:
Chris Roberts 2021-08-26 15:01:53 -07:00 committed by Paul Hinze
parent 65f733a288
commit c0304101f4
No known key found for this signature in database
GPG Key ID: B69DEDF2D55501C0

View File

@ -31,6 +31,17 @@ module VagrantPlugins
end
end
module HasMapper
def mapper
@mapper
end
def initialize(*args, **opts, &block)
@mapper = Mappers.new(broker) if respond_to?(:broker)
super
end
end
# Adds exception logging to all public instance methods
module ExceptionLogger
def self.prepended(klass)