Module: Gemmy::Patches::StringPatch::InstanceMethods::AlignRight
- Defined in:
- lib/gemmy/patches/string_patch.rb
Instance Method Summary collapse
Instance Method Details
#align_right(n, sep = "\n", c = ' ') ⇒ Object
facets
272 273 274 275 276 277 278 |
# File 'lib/gemmy/patches/string_patch.rb', line 272 def align_right(n, sep="\n", c=' ') return rjust(n.to_i,c.to_s) if sep==nil q = split(sep.to_s).map do |line| line.rjust(n.to_i,c.to_s) end q.join(sep.to_s) end |