Class: FormatR::LeftFormatter

Inherits:
Formatter show all
Defined in:
lib/formatr.rb

Overview

Format things that go to the left, ala <

Instance Method Summary collapse

Methods inherited from Formatter

#changeVarValue, #setVarValue

Constructor Details

#initialize(val) ⇒ LeftFormatter

Returns a new instance of LeftFormatter.



611
612
613
# File 'lib/formatr.rb', line 611

def initialize (val)
  super
end

Instance Method Details

#formatString(s, var_name, binding) ⇒ Object

send things left



616
617
618
619
# File 'lib/formatr.rb', line 616

def formatString (s, var_name, binding)
  s = super 
  s.ljust(@len)
end