Class: GCoder::GCode::MotionCommand

Inherits:
Command show all
Defined in:
lib/gcoder/gcode.rb,
lib/gcoder/gcode.rb

Instance Attribute Summary

Attributes inherited from Command

#args, #code

Instance Method Summary collapse

Methods inherited from Command

#initialize, #to_s

Constructor Details

This class inherits a constructor from GCoder::GCode::Command

Instance Method Details

#feedrateObject



134
135
136
# File 'lib/gcoder/gcode.rb', line 134

def feedrate
  args[:F].to_nif
end

#positionObject



130
131
132
# File 'lib/gcoder/gcode.rb', line 130

def position
  [ args[:X], args[:Y], args[:Z] ].map {|x| x.to_nif }
end