Gcode.Model.Comment (gcode v1.0.0)

A G-code comment.

Link to this section Summary

Functions

Initialise a comment.

Link to this section Types

@type error() :: {:comment_error, String.t()}
@type t() :: %Gcode.Model.Comment{comment: String.t()}

Link to this section Functions

@spec init(String.t()) :: Gcode.Result.t(t(), error())

Initialise a comment.

example

Example

iex> "Doc, in the carpark, with plutonium"
...> |> Comment.init()
{:ok, %Comment{comment: "Doc, in the carpark, with plutonium"}}