Skip to content

Commit eaf0eca

Browse files
committed
Remove trailing spaces.
1 parent f7089ea commit eaf0eca

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+248
-248
lines changed

bin/tb

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
#!/usr/bin/env ruby
22
#
33
# Copyright (C) 2011 Tanaka Akira <[email protected]>
4-
#
4+
#
55
# Redistribution and use in source and binary forms, with or without
66
# modification, are permitted provided that the following conditions
77
# are met:
8-
#
8+
#
99
# 1. Redistributions of source code must retain the above copyright
1010
# notice, this list of conditions and the following disclaimer.
1111
# 2. Redistributions in binary form must reproduce the above
@@ -15,7 +15,7 @@
1515
# 3. The name of the author may not be used to endorse or promote
1616
# products derived from this software without specific prior
1717
# written permission.
18-
#
18+
#
1919
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
2020
# OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
2121
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE

lib/tb.rb

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# lib/tb.rb - entry file for table library
22
#
33
# Copyright (C) 2010-2013 Tanaka Akira <[email protected]>
4-
#
4+
#
55
# Redistribution and use in source and binary forms, with or without
66
# modification, are permitted provided that the following conditions
77
# are met:
8-
#
8+
#
99
# 1. Redistributions of source code must retain the above copyright
1010
# notice, this list of conditions and the following disclaimer.
1111
# 2. Redistributions in binary form must reproduce the above
@@ -15,7 +15,7 @@
1515
# 3. The name of the author may not be used to endorse or promote
1616
# products derived from this software without specific prior
1717
# written permission.
18-
#
18+
#
1919
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
2020
# OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
2121
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE

lib/tb/basic.rb

+34-34
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# lib/tb/basic.rb - basic fetures for table library
22
#
33
# Copyright (C) 2010-2012 Tanaka Akira <[email protected]>
4-
#
4+
#
55
# Redistribution and use in source and binary forms, with or without
66
# modification, are permitted provided that the following conditions
77
# are met:
8-
#
8+
#
99
# 1. Redistributions of source code must retain the above copyright
1010
# notice, this list of conditions and the following disclaimer.
1111
# 2. Redistributions in binary form must reproduce the above
@@ -15,7 +15,7 @@
1515
# 3. The name of the author may not be used to endorse or promote
1616
# products derived from this software without specific prior
1717
# written permission.
18-
#
18+
#
1919
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
2020
# OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
2121
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
@@ -220,11 +220,11 @@ def define_field(field)
220220
#
221221
# returns true if the field specified by the argument is exist.
222222
#
223-
# t = Tb.new %w[fruit color],
224-
# %w[apple red],
225-
# %w[banana yellow],
226-
# %w[orange orange]
227-
# pp t
223+
# t = Tb.new %w[fruit color],
224+
# %w[apple red],
225+
# %w[banana yellow],
226+
# %w[orange orange]
227+
# pp t
228228
# #=> #<Tb
229229
# # {"_recordid"=>0, "fruit"=>"apple", "color"=>"red"}
230230
# # {"_recordid"=>1, "fruit"=>"banana", "color"=>"yellow"}
@@ -323,7 +323,7 @@ def reorder_fields!(fields)
323323
# # {"_recordid"=>1, "fruit"=>"banana", "color"=>"yellow"}
324324
# # {"_recordid"=>2, "fruit"=>"orange", "color"=>"orange"}>
325325
# p t.list_recordids #=> [0, 1, 2]
326-
#
326+
#
327327
def list_recordids
328328
@tbl["_recordid"].compact
329329
end
@@ -333,10 +333,10 @@ def list_recordids
333333
#
334334
# returns the number of records.
335335
#
336-
# t = Tb.new %w[fruit],
337-
# %w[apple],
338-
# %w[banana],
339-
# %w[orange]
336+
# t = Tb.new %w[fruit],
337+
# %w[apple],
338+
# %w[banana],
339+
# %w[orange]
340340
# pp t
341341
# #=> #<Tb
342342
# # {"_recordid"=>0, "fruit"=>"apple"}
@@ -360,10 +360,10 @@ def size
360360
# p t0.empty?
361361
# #=> true
362362
#
363-
# t3 = Tb.new %w[fruit],
364-
# %w[apple],
365-
# %w[banana],
366-
# %w[orange]
363+
# t3 = Tb.new %w[fruit],
364+
# %w[apple],
365+
# %w[banana],
366+
# %w[orange]
367367
# pp t3
368368
# #=> #<Tb
369369
# # {"_recordid"=>0, "fruit"=>"apple"}
@@ -514,7 +514,7 @@ def get_cell(recordid, field)
514514
# t = Tb.new %w[fruit color],
515515
# %w[apple red],
516516
# %w[banana yellow],
517-
# %w[orange orange]
517+
# %w[orange orange]
518518
# pp t
519519
# #=> #<Tb
520520
# # {"_recordid"=>0, "fruit"=>"apple", "color"=>"red"}
@@ -531,7 +531,7 @@ def get_cell(recordid, field)
531531
def delete_cell(recordid, field)
532532
recordid = check_recordid(recordid)
533533
field = check_field(field)
534-
raise ArgumentError, "can not delete reserved field: #{field.inspect}" if field.start_with?("_")
534+
raise ArgumentError, "can not delete reserved field: #{field.inspect}" if field.start_with?("_")
535535
ary = @tbl[field]
536536
index = @recordid2index[recordid]
537537
old = ary[index]
@@ -703,7 +703,7 @@ def concat(*tables)
703703
# # {"_recordid"=>0, "fruit"=>"apple", "color"=>"red"}
704704
# # {"_recordid"=>1, "fruit"=>"banana", "color"=>"yellow"}
705705
# # {"_recordid"=>2, "fruit"=>"orange", "color"=>"orange"}>
706-
# p t.update_record(1, {"color"=>"green"})
706+
# p t.update_record(1, {"color"=>"green"})
707707
# #=> nil
708708
# pp t
709709
# #=> #<Tb
@@ -761,7 +761,7 @@ def get_values(recordid, *fields)
761761
# # {"_recordid"=>0, "fruit"=>"apple", "color"=>"red"}
762762
# # {"_recordid"=>1, "fruit"=>"banana", "color"=>"yellow"}
763763
# # {"_recordid"=>2, "fruit"=>"orange", "color"=>"orange"}>
764-
# p t.get_record(1)
764+
# p t.get_record(1)
765765
# #=> #<Tb::Record: "_recordid"=>1, "fruit"=>"banana", "color"=>"yellow">
766766
#
767767
def get_record(recordid)
@@ -774,10 +774,10 @@ def get_record(recordid)
774774
#
775775
# iterates over the non-reserved field names of the table.
776776
#
777-
# t = Tb.new %w[fruit color],
778-
# %w[apple red],
779-
# %w[banana yellow],
780-
# %w[orange orange]
777+
# t = Tb.new %w[fruit color],
778+
# %w[apple red],
779+
# %w[banana yellow],
780+
# %w[orange orange]
781781
# pp t
782782
# #=> #<Tb
783783
# # {"_recordid"=>0, "fruit"=>"apple", "color"=>"red"}
@@ -800,10 +800,10 @@ def each_field
800800
#
801801
# iterates over the reserved and non-reserved field names of the table.
802802
#
803-
# t = Tb.new %w[fruit color],
804-
# %w[apple red],
805-
# %w[banana yellow],
806-
# %w[orange orange]
803+
# t = Tb.new %w[fruit color],
804+
# %w[apple red],
805+
# %w[banana yellow],
806+
# %w[orange orange]
807807
# pp t
808808
# #=> #<Tb
809809
# # {"_recordid"=>0, "fruit"=>"apple", "color"=>"red"}
@@ -862,7 +862,7 @@ def each_recordid
862862
# # {"_recordid"=>0, "fruit"=>"apple", "color"=>"red"}
863863
# # {"_recordid"=>1, "fruit"=>"banana", "color"=>"yellow"}
864864
# # {"_recordid"=>2, "fruit"=>"orange", "color"=>"orange"}>
865-
# pp t.to_a
865+
# pp t.to_a
866866
# #=> [#<Tb::Record: "fruit"=>"apple", "color"=>"red">,
867867
# # #<Tb::Record: "fruit"=>"banana", "color"=>"yellow">,
868868
# # #<Tb::Record: "fruit"=>"orange", "color"=>"orange">]
@@ -892,7 +892,7 @@ def to_a
892892
# # {"_recordid"=>0, "fruit"=>"apple", "color"=>"red"}
893893
# # {"_recordid"=>1, "fruit"=>"banana", "color"=>"yellow"}
894894
# # {"_recordid"=>2, "fruit"=>"orange", "color"=>"orange"}>
895-
# t.each_record {|record| p record }
895+
# t.each_record {|record| p record }
896896
# #=> #<Tb::Record: "fruit"=>"apple", "color"=>"red">
897897
# # #<Tb::Record: "fruit"=>"banana", "color"=>"yellow">
898898
# # #<Tb::Record: "fruit"=>"orange", "color"=>"orange">
@@ -918,7 +918,7 @@ def each_record_values(*fields)
918918
# table.header_and_each(header_proc) {|record| ... }
919919
#
920920
# +header_and_each+ calls _header_proc_ at first.
921-
# The block is called for each record after that.
921+
# The block is called for each record after that.
922922
#
923923
def header_and_each(header_proc, &block)
924924
header_proc.call(list_fields) if header_proc
@@ -952,7 +952,7 @@ def natjoin2(table2, missing=nil, retain_left=false, retain_right=false)
952952
y.yield record.to_h
953953
}
954954
}
955-
er = t1.natjoin2(t2, missing, retain_left, retain_right)
955+
er = t1.natjoin2(t2, missing, retain_left, retain_right)
956956
result = nil
957957
er.with_header {|header|
958958
result = Tb.new header
@@ -984,7 +984,7 @@ def fmap!(field)
984984
def delete_field(*fields)
985985
fields.each {|f|
986986
f = check_field(f)
987-
raise ArgumentError, "can not delete reserved field: #{f.inspect}" if f.start_with?("_")
987+
raise ArgumentError, "can not delete reserved field: #{f.inspect}" if f.start_with?("_")
988988
@tbl.delete(f)
989989
@field_list.delete(f)
990990
}

lib/tb/catreader.rb

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# lib/tb/catreader.rb - Tb::CatReader class
22
#
33
# Copyright (C) 2011-2012 Tanaka Akira <[email protected]>
4-
#
4+
#
55
# Redistribution and use in source and binary forms, with or without
66
# modification, are permitted provided that the following conditions
77
# are met:
8-
#
8+
#
99
# 1. Redistributions of source code must retain the above copyright
1010
# notice, this list of conditions and the following disclaimer.
1111
# 2. Redistributions in binary form must reproduce the above
@@ -15,7 +15,7 @@
1515
# 3. The name of the author may not be used to endorse or promote
1616
# products derived from this software without specific prior
1717
# written permission.
18-
#
18+
#
1919
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
2020
# OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
2121
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE

lib/tb/cmd_cat.rb

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# Copyright (C) 2011-2012 Tanaka Akira <[email protected]>
2-
#
2+
#
33
# Redistribution and use in source and binary forms, with or without
44
# modification, are permitted provided that the following conditions
55
# are met:
6-
#
6+
#
77
# 1. Redistributions of source code must retain the above copyright
88
# notice, this list of conditions and the following disclaimer.
99
# 2. Redistributions in binary form must reproduce the above
@@ -13,7 +13,7 @@
1313
# 3. The name of the author may not be used to endorse or promote
1414
# products derived from this software without specific prior
1515
# written permission.
16-
#
16+
#
1717
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
1818
# OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
1919
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
@@ -42,11 +42,11 @@ def (Tb::Cmd).op_cat
4242
Tb::Cmd.def_vhelp('cat', <<'End')
4343
Example:
4444
45-
% cat tst1.csv
45+
% cat tst1.csv
4646
a,b,c
4747
0,1,2
4848
4,5,6
49-
% cat tst2.csv
49+
% cat tst2.csv
5050
a,b,d
5151
U,V,W
5252
X,Y,Z

lib/tb/cmd_consecutive.rb

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# Copyright (C) 2011-2012 Tanaka Akira <[email protected]>
2-
#
2+
#
33
# Redistribution and use in source and binary forms, with or without
44
# modification, are permitted provided that the following conditions
55
# are met:
6-
#
6+
#
77
# 1. Redistributions of source code must retain the above copyright
88
# notice, this list of conditions and the following disclaimer.
99
# 2. Redistributions in binary form must reproduce the above
@@ -13,7 +13,7 @@
1313
# 3. The name of the author may not be used to endorse or promote
1414
# products derived from this software without specific prior
1515
# written permission.
16-
#
16+
#
1717
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
1818
# OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
1919
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
@@ -42,7 +42,7 @@ def (Tb::Cmd).op_consecutive
4242
Tb::Cmd.def_vhelp('consecutive', <<'End')
4343
Example:
4444
45-
% cat tst.csv
45+
% cat tst.csv
4646
a,b,c
4747
0,1,2
4848
4,5,6

lib/tb/cmd_crop.rb

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# Copyright (C) 2011-2012 Tanaka Akira <[email protected]>
2-
#
2+
#
33
# Redistribution and use in source and binary forms, with or without
44
# modification, are permitted provided that the following conditions
55
# are met:
6-
#
6+
#
77
# 1. Redistributions of source code must retain the above copyright
88
# notice, this list of conditions and the following disclaimer.
99
# 2. Redistributions in binary form must reproduce the above
@@ -13,7 +13,7 @@
1313
# 3. The name of the author may not be used to endorse or promote
1414
# products derived from this software without specific prior
1515
# written permission.
16-
#
16+
#
1717
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
1818
# OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
1919
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
@@ -107,7 +107,7 @@ def (Tb::Cmd).main_crop(argv)
107107
lmargin = 0
108108
while lmargin < ary.length
109109
if !ary[lmargin].nil? && ary[lmargin] != ''
110-
break
110+
break
111111
end
112112
lmargin += 1
113113
end

lib/tb/cmd_cross.rb

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# Copyright (C) 2011-2012 Tanaka Akira <[email protected]>
2-
#
2+
#
33
# Redistribution and use in source and binary forms, with or without
44
# modification, are permitted provided that the following conditions
55
# are met:
6-
#
6+
#
77
# 1. Redistributions of source code must retain the above copyright
88
# notice, this list of conditions and the following disclaimer.
99
# 2. Redistributions in binary form must reproduce the above
@@ -13,7 +13,7 @@
1313
# 3. The name of the author may not be used to endorse or promote
1414
# products derived from this software without specific prior
1515
# written permission.
16-
#
16+
#
1717
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
1818
# OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
1919
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE

lib/tb/cmd_cut.rb

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# Copyright (C) 2011-2012 Tanaka Akira <[email protected]>
2-
#
2+
#
33
# Redistribution and use in source and binary forms, with or without
44
# modification, are permitted provided that the following conditions
55
# are met:
6-
#
6+
#
77
# 1. Redistributions of source code must retain the above copyright
88
# notice, this list of conditions and the following disclaimer.
99
# 2. Redistributions in binary form must reproduce the above
@@ -13,7 +13,7 @@
1313
# 3. The name of the author may not be used to endorse or promote
1414
# products derived from this software without specific prior
1515
# written permission.
16-
#
16+
#
1717
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
1818
# OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
1919
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE

0 commit comments

Comments
 (0)