Method: Puppet::Relationship#initialize

Defined in:
lib/puppet/relationship.rb

#initialize(source, target, options = {}) ⇒ Relationship

Returns a new instance of Relationship.



37
38
39
40
41
42
43
44
45
46
# File 'lib/puppet/relationship.rb', line 37

def initialize(source, target, options = {})
  @source, @target = source, target

  options = (options || {}).inject({}) { |h,a| h[a[0].to_sym] = a[1]; h }
  [:callback, :event].each do |option|
    if value = options[option]
      send(option.to_s + "=", value)
    end
  end
end