Class: Hocho::PropertyProviders::AddDefault

Inherits:
Base
  • Object
show all
Defined in:
lib/hocho/property_providers/add_default.rb

Instance Method Summary collapse

Constructor Details

#initialize(properties: {}) ⇒ AddDefault

Returns a new instance of AddDefault.



6
7
8
# File 'lib/hocho/property_providers/add_default.rb', line 6

def initialize(properties: {})
  @properties = properties
end

Instance Method Details

#determine(host) ⇒ Object



10
11
12
# File 'lib/hocho/property_providers/add_default.rb', line 10

def determine(host)
  host.properties.replace(host.properties.reverse_merge(@properties))
end