Class: PuppetX::Puppetlabs::Migration::CatalogDeltaModel::Edge

Inherits:
Diff
  • Object
show all
Defined in:
lib/puppet_x/puppetlabs/migration/catalog_delta_model.rb

Overview

A Catalog Edge

Instance Attribute Summary collapse

Attributes inherited from Diff

#diff_id

Instance Method Summary collapse

Methods inherited from Diff

#assign_ids

Methods inherited from DeltaEntity

from_hash

Methods included from ModelObject

#initialize_from_hash, #to_hash

Constructor Details

#initialize(source, target) ⇒ Edge

Returns a new instance of Edge.

Parameters:

  • source (String)
  • target (String)


151
152
153
154
# File 'lib/puppet_x/puppetlabs/migration/catalog_delta_model.rb', line 151

def initialize(source, target)
  @source = assert_type(String, source)
  @target = assert_type(String, target)
end

Instance Attribute Details

#sourceObject (readonly)



142
143
144
# File 'lib/puppet_x/puppetlabs/migration/catalog_delta_model.rb', line 142

def source
  @source
end

#targetObject (readonly)



147
148
149
# File 'lib/puppet_x/puppetlabs/migration/catalog_delta_model.rb', line 147

def target
  @target
end

Instance Method Details

#==(other) ⇒ Object



156
157
158
# File 'lib/puppet_x/puppetlabs/migration/catalog_delta_model.rb', line 156

def ==(other)
  other.instance_of?(Edge) && source == other.source && target == other.target
end