Sha256: 566df7ee478b8b1d7b5c8052eb6456ac759f5e43dcfea46d8e89c5cea76fbe06
Contents?: true
Size: 756 Bytes
Versions: 4
Compression:
Stored size: 756 Bytes
Contents
module VagrantPlugins module CommandServe module Util # Requires a broker to be set when initializing an # instance and adds an accessor to the broker module HasBroker def broker @broker end def initialize(*args, **opts, &block) @broker = opts.delete(:broker) raise ArgumentError, "Expected `Broker' to be provided" if @broker.nil? sup = self.method(:initialize).super_method if sup.parameters.empty? super() elsif !opts.empty? && sup.parameters.detect{ |type, _| type == :keyreq || type == :keyrest } super else super(*args, &block) end end end end end end
Version data entries
4 entries across 4 versions & 2 rubygems