Class: Hocho::PropertyProviders::AddDefault
- Defined in:
- lib/hocho/property_providers/add_default.rb
Instance Method Summary collapse
- #determine(host) ⇒ Object
-
#initialize(properties: {}) ⇒ AddDefault
constructor
A new instance of AddDefault.
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 |