Method: Rex::Struct2::Element#update_restraint

Defined in:
lib/rex/struct2/element.rb

#update_restraintObject



26
27
28
29
30
31
32
33
34
35
36
37
38
# File 'lib/rex/struct2/element.rb', line 26

def update_restraint
  if self.restraint
    # Sort of a hack, but remove the restraint before we update, so we aren't using
    # the old restraint during calculating the restraint update value
    old_restraint, self.restraint = self.restraint, nil
    old_restraint.update(self.slength)
    self.restraint = old_restraint
  end

  if self.container
    self.container.update_restraint
  end
end