--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Formats a <tt>number</tt> into a currency string (e.g., $13.65). You can specify a format to use and even overwrite some of the format options.
- !ruby/struct:SM::Flow::H 
  level: 4
  text: Parameters
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "number<Numeric>:"
    body: Numeric value to convert
  - !ruby/struct:SM::Flow::LI 
    label: "format_name<Symbol>:"
    body: name of the format to use
  - !ruby/struct:SM::Flow::LI 
    label: "options<Hash>:"
    body: options which will overwrite the used format
  type: :NOTE
- !ruby/struct:SM::Flow::H 
  level: 4
  text: Returns
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "String:"
    body: a string representing the number converted in currency
  type: :NOTE
- !ruby/struct:SM::Flow::H 
  level: 4
  text: Options
- !ruby/struct:SM::Flow::P 
  body: ":precision - Sets the level of precision :unit - Sets the denomination of the currency :format - Sets the format of the output string (defaults to &quot;%u%n&quot;). The field types are:"
- !ruby/struct:SM::Flow::P 
  body: "%u The currency unit %n The number"
- !ruby/struct:SM::Flow::H 
  level: 4
  text: Examples
- !ruby/struct:SM::Flow::P 
  body: "to_currency(1234567890.506, :US, :precision =&gt; 1) # =&gt; &quot;$1,234,567,890.5&quot; to_currency(1234567890.516, :FR) # =&gt;&quot;1 234 567 890,52\xE2\x82\xAC&quot; to_currency(1234567890.516, :US, :unit =&gt; &quot;\xE2\x82\xAC&quot;) # =&gt;&quot;\xE2\x82\xAC1,234,567,890.52&quot; to_currency(1234567890.506, :US, :precision =&gt; 3, :unit =&gt; &quot;\xE2\x82\xAC&quot;) # =&gt; &quot;\xE2\x82\xAC1,234,567,890.506&quot; to_currency(1234567890.506, :AU, :unit =&gt; &quot;$AUD&quot;, :format =&gt; '%n %u') # =&gt; &quot;1,234,567,890.51 $AUD&quot;"
full_name: Numeric::Transformer::to_currency
is_singleton: true
name: to_currency
params: (number, format_name = nil, options = {})
visibility: public
