J
Jeff Dickens
I have a question about the optparse examples at
http://docs.meg.nu/local-docs/ruby/optparse/optparse.htmlWhat does the
following do ?if (Fixnum ===
class << vars
def inspect
"{" + collect {|k,v| ":#{k.id2name}=>#{v.inspect}"}.join(", ") + "}"
end
end
end
and then this line which is commented out: #opts.variable.each {|sym| puts
"#{sym} = #{opts.send(sym).inspect}"}Looks like some kind of debug code, but
I thought if I understood it itshed some light on things in general.
http://docs.meg.nu/local-docs/ruby/optparse/optparse.htmlWhat does the
following do ?if (Fixnum ===
class << vars
def inspect
"{" + collect {|k,v| ":#{k.id2name}=>#{v.inspect}"}.join(", ") + "}"
end
end
end
and then this line which is commented out: #opts.variable.each {|sym| puts
"#{sym} = #{opts.send(sym).inspect}"}Looks like some kind of debug code, but
I thought if I understood it itshed some light on things in general.