Skip to content
Browse files

columnize.rb: some module function text got bolixed. Makefile: allow …

…specifying which rake
  • Loading branch information...
1 parent d11ed04 commit 1a1c2839579ba2254b1572fd0f7086e3368f8f8d @rocky committed Mar 9, 2013
Showing with 14 additions and 5 deletions.
  1. +5 −1 Makefile
  2. +9 −4 lib/columnize.rb
View
6 Makefile
@@ -1,5 +1,9 @@
# I'll admit it -- I'm an absent-minded old-timer who has trouble
# learning new tricks.
+
+RUBY ?= ruby
+RAKE ?= rake
+
test: check
#: Default target; same as "make check"
@@ -8,4 +12,4 @@ all: check
#: Same as corresponding rake task
%:
- rake $@
+ $(RAKE) $@
View
13 lib/columnize.rb
@@ -110,18 +110,23 @@ def cell_size(cell, term_adjust)
end.size
end
- # For example, for a line width of 4 characters (arranged vertically):
+ # columize([args]) => String
+ #
+ # Return a string from an array with embedded newlines formatted so
+ # that when printed the columns are aligned.
+ #
+ # For example, for a line width of 4 characters (arranged vertically):
# a = (1..4).to_a
# Columnize.columnize(a) => '1 3\n2 4\n'
#
- # Alternatively:
+ # Alternatively:
# a.columnize => '1 3\n2 4\n'
#
- # Arranged horizontally:
+ # Arranged horizontally:
# a.columnize(:arrange_vertical => false) =>
# ['1', '2,', '3', '4'] => '1 2\n3 4\n'
#
- # Formatted as an array using format specifier '%02d':
+ # Formatted as an array using format specifier '%02d':
# puts (1..10).to_a.columnize(:arrange_array => true, :colfmt => '%02d',
# :displaywidth => 10) =>
# [01, 02,

0 comments on commit 1a1c283

Please sign in to comment.
Something went wrong with that request. Please try again.