Sha256: 4923a38c0b1f5b3399a6b278c371757201727fc4c1136159902c5624fe31eccc

Contents?: true

Size: 670 Bytes

Versions: 5

Compression:

Stored size: 670 Bytes

Contents

module Vcloud
  module EdgeGateway
    class ConfigurationDiffer

        def initialize local, remote
          @local = local
          @remote = remote
        end

        def diff
          ( stripped_local_config == stripped_remote_config ) ? [] : HashDiff.diff(stripped_local_config, stripped_remote_config)
        end

        def stripped_local_config
          strip_fields_for_differ_to_ignore(@local) unless @local.nil?
        end

        def stripped_remote_config
          strip_fields_for_differ_to_ignore(@remote) unless @remote.nil?
        end

        def strip_fields_for_differ_to_ignore(config)
          config
        end

    end
  end

end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
vcloud-edge_gateway-0.5.0 lib/vcloud/edge_gateway/configuration_differ.rb
vcloud-edge_gateway-0.4.0 lib/vcloud/edge_gateway/configuration_differ.rb
vcloud-edge_gateway-0.3.0 lib/vcloud/edge_gateway/configuration_differ.rb
vcloud-edge_gateway-0.2.4 lib/vcloud/edge_gateway/configuration_differ.rb
vcloud-edge_gateway-0.2.3 lib/vcloud/edge_gateway/configuration_differ.rb