mirror of
https://github.com/hashicorp/vagrant.git
synced 2026-02-03 20:39:27 -05:00
25 lines
590 B
Ruby
25 lines
590 B
Ruby
# Copyright (c) HashiCorp, Inc.
|
|
# SPDX-License-Identifier: BUSL-1.1
|
|
|
|
module VagrantPlugins
|
|
module CommandServe
|
|
class Mappers
|
|
class PluginManagerFromProto < Mapper
|
|
def initialize
|
|
super(
|
|
inputs: [
|
|
Input.new(type: SDK::Args::PluginManager),
|
|
Input.new(type: Broker),
|
|
],
|
|
output: Client::PluginManager,
|
|
func: method(:converter)
|
|
)
|
|
end
|
|
|
|
def converter(proto, broker)
|
|
Client::PluginManager.load(proto, broker: broker)
|
|
end
|
|
end
|
|
end
|
|
end
|
|
end
|