framingham/heartdisease.rb in framingham-0.1.20130710222706 vs framingham/heartdisease.rb in framingham-0.1.20130711193533

- old
+ new

@@ -1,6 +1,7 @@ module Framingham::Heartdisease extend Framingham, self +include Framingham def eval options = {} begin #initialize options = NORMAL.merge options @@ -67,9 +68,17 @@ def help "Evaluate 10 year heart disease risk" end protected + +def internal_debug _ = {} + _ = eval _ + '%i' % _[:heart_age].round + + '%5.1f' % ((1000 * _[:risk]).round / 10.0) + + '%5.1f' % ((1000 * _[:normal]).round / 10.0) + + '%5.1f' % ((1000 * _[:optimal]).round / 10.0) +end $, = ", " #default join NORMAL = { #default options age: 30,