def stringify amount, currency, opts={}
      definition    = definitions[currency]
      separators    = definition[:separators] || {}
      format        = "%.#{definition[:minor_unit]}f"
      string        = format % amount
      major, minor  = string.split('.')

      major.gsub!(/(\d)(?=(\d\d\d)+(?!\d))/) { $1 + separators[:major] } if separators[:major] && opts[:format] != :plain
      
      string      = minor ? major + (opts[:format] == :plain || !separators[:minor] ? '.' : separators[:minor]) + minor : major
      pre         = [[:amount, :plain].include?(opts[:format]) && '', opts[:format] == :symbol && definition[:symbol], currency.to_s.upcase + ' '].detect{|a| a.is_a?(String)}
      
      "#{pre}#{string}"
    end
def stringify amount, currency, opts={}
      definition    = definitions[currency]
      separators    = definition[:separators] || {}
      format        = "%.#{definition[:minor_unit]}f"
      string        = format % amount
      major, minor  = string.split('.')

      major.gsub!(/(\d)(?=(\d\d\d)+(?!\d))/) { $1 + separators[:major] } if separators[:major] && opts[:format] != :plain
      
      string      = minor ? major + (opts[:format] == :plain || !separators[:minor] ? '.' : separators[:minor]) + minor : major
      pre         = [[:amount, :plain].include?(opts[:format]) && '', opts[:format] == :symbol && definition[:symbol], currency.to_s.upcase + ' '].detect{|a| a.is_a?(String)}
      
      "#{pre}#{string}"
    end
Converts the currency to a string in ISO 4217 standardized format, either with or without the currency. This leaves you
 with no worries how to display the currency.
 @param [BigDecimal, Fixed, Float] amount The amount of currency you want to stringify
 @param [String, Symbol] currency The currency you want to stringify
 @param [Hash] opts The options for formatting
 @option opts [Boolean] :format The format to put the string out in: :amount for only the amount, :symbol for a string with a currency symbol
 @return [String] The formatted string
 @example Convert a currency to a string
   Exchange::ISO.stringify(49.567, :usd) #=> "USD 49.57"
 @example Convert a currency without minor to a string
   Exchange::ISO.stringif(45, :jpy) #=> "JPY 45"
 @example Convert a currency with a three decimal minor to a string
   Exchange::ISO.stringif(34.34, :omr) #=> "OMR 34.340"
 @example Convert a currency to a string without the currency
   Exchange::ISO.stringif(34.34, :omr, :amount_only => true) #=> "34.340"