Skip to content

Instantly share code, notes, and snippets.

View dlozano's full-sized avatar
🛶
I may be slow to respond.

David Lozano dlozano

🛶
I may be slow to respond.
View GitHub Profile
@dlozano
dlozano / gist:5302054
Last active December 15, 2015 18:09
WTF RUBY 1.8 !!!!!!!
def ljust(str, required_length, padstr = ' ')
just(str, true, padstr)
end
def rjust(str, required_length, padstr = ' ')
just(str, false, padstr)
end
def just(str, required_length, left = true, padstr = ' ')