Without class definition
Closed this issue · 2 comments
kachick commented
Before
CONST = OptionalArgument.define do
opt :name
end
def func(opts)
opts = CONST.parse opts
end
After
def func(opts)
opts = OptionalArgument.parse opts do
opt :name
end
end
kachick commented
Just to implement is easy. But I keep to reduce class objects as current code. .parse
should cache and reuse the class object when called twice.
kachick commented
#10 (comment) looks hard or impossible for me. (Perfectly cache is not defined with block 😢 )