Class: FormatR::RightFormatter
Overview
Format things that go to the right, ala >
Instance Method Summary collapse
-
#formatString(s, var_name, binding) ⇒ Object
send things right.
-
#initialize(val) ⇒ RightFormatter
constructor
A new instance of RightFormatter.
Methods inherited from Formatter
Constructor Details
#initialize(val) ⇒ RightFormatter
Returns a new instance of RightFormatter.
624 625 626 627 |
# File 'lib/formatr.rb', line 624 def initialize (val) super @len = val.size() end |
Instance Method Details
#formatString(s, var_name, binding) ⇒ Object
send things right
630 631 632 633 |
# File 'lib/formatr.rb', line 630 def formatString (s, var_name, binding) s = super s.rjust(@len) end |