README.md in dentaku-2.0.8 vs README.md in dentaku-2.0.9
- old
+ new
@@ -167,15 +167,15 @@
calc.dependencies("annual_income / 5")
#=> [:annual_income]
```
-#### Calculator.solve!
+#### Calculator.solve! / Calculator.solve
Have Dentaku figure out the order in which your formulas need to be evaluated.
Pass in a hash of `{eventual_variable_name: "expression"}` to `solve!` and
-have Dentaku figure out dependencies (using `TSort`) for you.
+have Dentaku resolve dependencies (using `TSort`) for you.
Raises `TSort::Cyclic` when a valid expression order cannot be found.
```ruby
calc = Dentaku::Calculator.new
@@ -192,10 +192,15 @@
have_money: "make_money"
}
#=> raises TSort::Cyclic
```
+`solve!` will also raise an exception if any of the formulas in the set cannot
+be evaluated (e.g. raise `ZeroDivisionError`). The non-bang `solve` method will
+find as many solutions as possible and return the symbol `:undefined` for the
+problem formulas.
+
INLINE COMMENTS
---------------------------------
If your expressions grow long or complex, you may add inline comments for future
reference. This is particularly useful if you save your expressions in a model.
@@ -270,10 +275,10 @@
LICENSE
-------
(The MIT License)
-Copyright © 2012 Solomon White
+Copyright © 2012-2016 Solomon White
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the ‘Software’), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of