Class: MoneyHeuristics::SearchTree
- Inherits:
-
Object
- Object
- MoneyHeuristics::SearchTree
- Defined in:
- lib/money-heuristics/search_tree.rb
Instance Method Summary collapse
-
#build ⇒ Object
Build a search tree from the currency database.
-
#initialize(currency_data) ⇒ SearchTree
constructor
A new instance of SearchTree.
Constructor Details
#initialize(currency_data) ⇒ SearchTree
Returns a new instance of SearchTree.
3 4 5 |
# File 'lib/money-heuristics/search_tree.rb', line 3 def initialize(currency_data) @currency_data = currency_data end |
Instance Method Details
#build ⇒ Object
Build a search tree from the currency database
8 9 10 11 12 13 14 |
# File 'lib/money-heuristics/search_tree.rb', line 8 def build { by_symbol: currencies_by_symbol, by_iso_code: currencies_by_iso_code, by_name: currencies_by_name } end |