Hi,
I was wondering what was the idiomatic way to do this:
class BigDipper
def little_dipper(a_symbol)
define_singleton_method(a_symbol) {
"#{a_symbol} is double-helix"
}
end
end
s_ = BigDipper.new
s_.little_dipper(:DNA)
s_.DNA
=> "DNA is a double-helix"
q_ = BigDipper.new
q_.respond_to? :DNA
=> false
?
Thanks,
Bill