Class: Google::Resourcemanager::Property::Base

Inherits:
Puppet::Property
  • Object
show all
Defined in:
lib/google/resourcemanager/property/base.rb

Overview

A Puppet property that can compare its values

Direct Known Subclasses

Enum, Integer, NameValues, String, Time

Instance Method Summary collapse

Instance Method Details

#insync?(is) ⇒ Boolean

Returns:

  • (Boolean)


35
36
37
38
39
40
41
42
43
# File 'lib/google/resourcemanager/property/base.rb', line 35

def insync?(is)
  debug("insync? #{name}: '#{is}' == '#{should}'")
  insync = false
  insync = true if is == :absent && should == :absent
  insync = (is == should) unless is == :absent || should == :absent
  debug("insync? #{name}: '#{is}' == '#{should}': #{insync}")
  resource.provider.dirty name, is, should unless insync
  insync
end