Lets say I have the object line from class Line:
class Line
def initialize point1, point2
@p1 = point1
@p2 = point2
end
end
line = Line.new...
How can I binary serialize the line object? I tried with:
data = Marshal::dump(line, "path/to/still/unexisting/file")
but it created file and didn't add anything. I read the Class: IO documentation but I couldn't really get it.