Class: Savage::Path

Inherits:
Object
  • Object
show all
Defined in:
lib/monkeypatchsavage.rb

Instance Method Summary collapse

Instance Method Details

#toAbsoluteObject



101
102
103
104
105
106
107
108
109
# File 'lib/monkeypatchsavage.rb', line 101

def toAbsolute
  raise "Does not start with move command" unless self.directions[0].kind_of? Savage::Directions::MoveTo
  #raise "First move is not absolute" unless self.directions[0].absolute?
  fromp = self.directions[0].target
  self.directions[0].setAbsolute(true)
  for sp in @subpaths do
    fromp = sp.toAbsolute(fromp)
  end
end