Module: Puppet::Pops::Model::LocatableExpression::ClassModule Private

Defined in:
lib/puppet/pops/model/model.rb

This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.

Instance Method Summary collapse

Instance Method Details

#locatorObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Go through the gymnastics of making either value or pattern settable with synchronization to the other form. A derived value cannot be serialized and we want to serialize the pattern. When recreating the object we need to recreate it from the pattern string. The below sets both values if one is changed.



44
45
46
47
48
49
# File 'lib/puppet/pops/model/model.rb', line 44

def locator
  unless result = getLocator
    setLocator(result = Parser::Locator.locator(source_text, source_ref(), line_offsets))
  end
  result
end