Allow types to be specified when instantiating a typed hash
This commit is contained in:
parent
bc898e385d
commit
1a3136b9fe
@ -270,9 +270,7 @@ module Vagrant
|
||||
# If the file doesn't exist, we probably just have a machine created
|
||||
# by a version of Vagrant that didn't cache shared folders. Report no
|
||||
# shared folders to be safe.
|
||||
folders = Vagrant::Util::TypedHash.new()
|
||||
folders.types = {}
|
||||
folders
|
||||
Vagrant::Util::TypedHash.new(types: {})
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@ -5,6 +5,11 @@ module Vagrant
|
||||
# Types available in the Hash
|
||||
attr_accessor :types
|
||||
|
||||
def initialize(**opts)
|
||||
if opts[:types]
|
||||
@types = opts[:types]
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user