doctrines in ruby