Class: Gcodify::Op
- Inherits:
-
Object
- Object
- Gcodify::Op
- Defined in:
- lib/gcodify/op.rb
Overview
Direct Known Subclasses
Gcodify::Ops::DummyOp, Gcodify::Ops::FaceOp, Gcodify::Ops::GcodeOp, Gcodify::Ops::HoleOp, Gcodify::Ops::PocketOp
Instance Attribute Summary collapse
-
#options ⇒ Hash
readonly
The options passed to the Op.
Instance Method Summary collapse
-
#initialize(options) ⇒ Op
constructor
A new instance of Op.
-
#to_gcode ⇒ String
Converts the Op to Gcode.
Constructor Details
#initialize(options) ⇒ Op
Returns a new instance of Op.
12 13 14 |
# File 'lib/gcodify/op.rb', line 12 def initialize() @options = end |
Instance Attribute Details
#options ⇒ Hash (readonly)
Returns the options passed to the Op. Used for testing.
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/gcodify/op.rb', line 8 class Op attr_reader :options # @param options [Hash] a {Hash} of options to be passed in to the op def initialize() @options = end # Converts the {Op} to Gcode. Each *{Op} has it's own implementation of #to_gcode, # depending on what gcode it has to generate. # # @return [String] some gcode def to_gcode "" # Return an empty string for testing purposes. end end |
Instance Method Details
#to_gcode ⇒ String
Converts the Gcodify::Op to Gcode. Each *Gcodify::Op has it’s own implementation of #to_gcode, depending on what gcode it has to generate.
20 21 22 |
# File 'lib/gcodify/op.rb', line 20 def to_gcode "" # Return an empty string for testing purposes. end |