Old Russian measure of length: Difference between revisions
Content added Content deleted
(→{{header|Ruby}}: Add Ruby) |
|||
Line 2,223: | Line 2,223: | ||
from, to = meth.to_s.split("2").map(&:to_sym) |
from, to = meth.to_s.split("2").map(&:to_sym) |
||
raise NoMethodError, meth if ([from,to]-RATIOS.keys).size > 0 |
raise NoMethodError, meth if ([from,to]-RATIOS.keys).size > 0 |
||
RATIOS[from] * arg / RATIOS[to] |
|||
(RATIOS[from] / RATIOS[to]) * arg |
|||
end |
end |
||