# store.each_rate do |iso_from, iso_to, rate| # puts. #Money money money moneymoney isodef get_rate ( iso_from, iso_to ) end # Iterate over rate tuples (iso_from, iso_to, rate) # iso_from Currency ISO string. adding the same rate must not produce duplicates. def add_rate ( iso_from, iso_to, rate ) end # Get rate. Money::Currency and use in sorting/grouping operation.įor instance, let's assume your Rails application needs to render a currencyĬustom methods to return the list of major currencies and all currencies as The priority attribute is an arbitrary numerical value you can assign to the Other attributes, such as :name or :priority, exist to provide aīasic API you can take advantage of to build your application. :symbol, are used by the Money class to print out a representation of the
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |