Class: Gcodify::Ops::DummyOp

Inherits:
Gcodify::Op show all
Defined in:
lib/gcodify/ops/dummyop.rb

Overview

A passthrough Gcodify::Op for testing purposes. It contains @str which is the string passed during initialization, which will be returned by #to_gcode.

Instance Attribute Summary

Attributes inherited from Gcodify::Op

#options

Instance Method Summary collapse

Constructor Details

#initialize(str) ⇒ DummyOp


9
10
11
# File 'lib/gcodify/ops/dummyop.rb', line 9

def initialize(str)
  @str = str
end

Instance Method Details

#to_gcodeString

Returns the string that was passed in when initted.


16
17
18
# File 'lib/gcodify/ops/dummyop.rb', line 16

def to_gcode
  @str
end