Class Lisp::Format::Directives::DollarFP
In: lib/facet/lisp-format.rb
Parent: Directive

Represents the ~$ (Dollars floating-point) directive. This directive outputs a floating point argument

Methods

execute  

Public Instance methods

Outputs the argument using a floating point format that suits dollar values. The full form is

  ~d,n,w,padchar:@$

with the following interpretations

d (2)
number of digits to print after the decimal point (.),
n (1)
number of digits to print before the decimal point (.),
w (0)
minimum width of the field,
padchar (?\s)
character used to produce right-adjusting padding with,
:
the sign of the value is output before any padding,
@
numbers are always output with sign prepended.

[Validate]