I do not know the correct terminology. I tried to google it and could not find anything for that reason.
I am writing a Ruby library, and I want to rewrite the functions so they work as below as I prefer it for readability (inside a block?)
I have a function that does this
@dwg = Dwg.new("test.dwg")
@dwg.line([0,0,0],[1,1,0])
@dwg.save
I want to rewrite it so it works like this
Dwg.new("test.dwg") do
line([0,0,0],[1,1,0])
save
end
Can you outline the way I go about this?