libpath-ruby 0.2.1 → 0.2.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (83) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE +33 -0
  3. data/README.md +25 -8
  4. data/examples/path_from_arg0.md +43 -43
  5. data/examples/path_from_arg0.rb +25 -23
  6. data/lib/libpath/constants/unix.rb +71 -71
  7. data/lib/libpath/constants/windows.rb +72 -72
  8. data/lib/libpath/constants.rb +18 -19
  9. data/lib/libpath/diagnostics/parameter_checking.rb +25 -25
  10. data/lib/libpath/diagnostics.rb +1 -1
  11. data/lib/libpath/exceptions/libpath_base_exception.rb +13 -13
  12. data/lib/libpath/exceptions/malformed_name_exception.rb +23 -22
  13. data/lib/libpath/exceptions.rb +3 -3
  14. data/lib/libpath/form/unix.rb +104 -103
  15. data/lib/libpath/form/windows.rb +200 -199
  16. data/lib/libpath/form.rb +18 -18
  17. data/lib/libpath/internal_/array.rb +53 -53
  18. data/lib/libpath/internal_/platform.rb +24 -24
  19. data/lib/libpath/internal_/string.rb +20 -17
  20. data/lib/libpath/internal_/unix/form.rb +117 -112
  21. data/lib/libpath/internal_/windows/drive.rb +62 -59
  22. data/lib/libpath/internal_/windows/form.rb +193 -188
  23. data/lib/libpath/libpath.rb +3 -0
  24. data/lib/libpath/path/unix.rb +114 -112
  25. data/lib/libpath/path/windows.rb +120 -118
  26. data/lib/libpath/path.rb +18 -20
  27. data/lib/libpath/util/unix.rb +258 -258
  28. data/lib/libpath/util/windows.rb +400 -400
  29. data/lib/libpath/util.rb +18 -19
  30. data/lib/libpath/version.rb +23 -23
  31. data/lib/libpath.rb +1 -1
  32. data/test/performance/benchmark_drive_letter.rb +50 -10
  33. data/test/performance/benchmark_gsub_string_or_regex.rb +27 -23
  34. data/test/performance/benchmark_rindex2.rb +56 -48
  35. data/test/performance/benchmark_split.rb +16 -10
  36. data/test/unit/compare/ts_all.rb +4 -4
  37. data/test/unit/equate/ts_all.rb +4 -4
  38. data/test/unit/equate/unix/ts_all.rb +4 -4
  39. data/test/unit/equate/windows/ts_all.rb +4 -4
  40. data/test/unit/exceptions/tc_libpath_base_exception.rb +10 -8
  41. data/test/unit/exceptions/tc_malformed_name_exception.rb +14 -12
  42. data/test/unit/exceptions/ts_all.rb +4 -4
  43. data/test/unit/form/tc_absolute_functions.rb +242 -240
  44. data/test/unit/form/ts_all.rb +4 -4
  45. data/test/unit/form/unix/tc_absolute_functions.rb +158 -155
  46. data/test/unit/form/unix/ts_all.rb +4 -4
  47. data/test/unit/form/windows/tc_absolute_functions.rb +628 -625
  48. data/test/unit/form/windows/ts_all.rb +4 -4
  49. data/test/unit/internal_/tc_array.rb +36 -32
  50. data/test/unit/internal_/ts_all.rb +4 -4
  51. data/test/unit/internal_/unix/form/tc_slash_functions.rb +38 -35
  52. data/test/unit/internal_/unix/form/ts_all.rb +4 -4
  53. data/test/unit/internal_/unix/tc_split_path.rb +387 -384
  54. data/test/unit/internal_/unix/ts_all.rb +4 -4
  55. data/test/unit/internal_/windows/form/tc_get_windows_volume.rb +157 -153
  56. data/test/unit/internal_/windows/form/tc_slash_functions.rb +39 -35
  57. data/test/unit/internal_/windows/form/ts_all.rb +4 -4
  58. data/test/unit/internal_/windows/tc_split_path.rb +874 -869
  59. data/test/unit/internal_/windows/ts_all.rb +4 -4
  60. data/test/unit/parse/ts_all.rb +4 -4
  61. data/test/unit/path/tc_path.rb +732 -732
  62. data/test/unit/path/ts_all.rb +4 -4
  63. data/test/unit/path/unix/tc_path.rb +544 -540
  64. data/test/unit/path/unix/ts_all.rb +4 -4
  65. data/test/unit/path/windows/tc_path.rb +608 -603
  66. data/test/unit/path/windows/ts_all.rb +4 -4
  67. data/test/unit/tc_version.rb +25 -22
  68. data/test/unit/ts_all.rb +4 -4
  69. data/test/unit/util/tc_combine_paths.rb +110 -105
  70. data/test/unit/util/tc_derive_relative_path.rb +8 -3
  71. data/test/unit/util/tc_make_path_canonical.rb +142 -138
  72. data/test/unit/util/ts_all.rb +4 -4
  73. data/test/unit/util/unix/tc_combine_paths.rb +38 -34
  74. data/test/unit/util/unix/tc_derive_relative_path.rb +80 -75
  75. data/test/unit/util/unix/tc_make_path_absolute.rb +74 -70
  76. data/test/unit/util/unix/tc_make_path_canonical.rb +95 -90
  77. data/test/unit/util/unix/ts_all.rb +4 -4
  78. data/test/unit/util/windows/tc_combine_paths.rb +82 -77
  79. data/test/unit/util/windows/tc_derive_relative_path.rb +98 -93
  80. data/test/unit/util/windows/tc_make_path_absolute.rb +105 -101
  81. data/test/unit/util/windows/tc_make_path_canonical.rb +158 -153
  82. data/test/unit/util/windows/ts_all.rb +4 -4
  83. metadata +9 -8
@@ -1,16 +1,17 @@
1
1
 
2
2
  # ######################################################################## #
3
- # File: libpath/form/windows.rb
3
+ # File: libpath/form/windows.rb
4
4
  #
5
- # Purpose: LibPath::Form::Windows module
5
+ # Purpose: LibPath::Form::Windows module
6
6
  #
7
- # Created: 8th January 2019
8
- # Updated: 16th April 2019
7
+ # Created: 8th January 2019
8
+ # Updated: 6th April 2024
9
9
  #
10
- # Home: http://github.com/synesissoftware/libpath.Ruby
10
+ # Home: http://github.com/synesissoftware/libpath.Ruby
11
11
  #
12
- # Author: Matthew Wilson
12
+ # Author: Matthew Wilson
13
13
  #
14
+ # Copyright (c) 2019-2024, Matthew Wilson and Synesis Information Systems
14
15
  # Copyright (c) 2019, Matthew Wilson and Synesis Software
15
16
  # All rights reserved.
16
17
  #
@@ -44,7 +45,6 @@
44
45
  # ######################################################################## #
45
46
 
46
47
 
47
-
48
48
  =begin
49
49
  =end
50
50
 
@@ -53,6 +53,7 @@ require 'libpath/diagnostics'
53
53
  require 'libpath/internal_/windows/drive'
54
54
  require 'libpath/internal_/windows/form'
55
55
 
56
+
56
57
  module LibPath # :nodoc:
57
58
  module Form # :nodoc:
58
59
  module Windows # :nodoc:
@@ -61,289 +62,289 @@ module Windows # :nodoc:
61
62
  # any class or module including/extending module LibPath::Form::Windows
62
63
  module LibPath_Form_Windows_Methods
63
64
 
64
- # Classifies a path
65
- #
66
- # === Return
67
- #
68
- # One of +:absolute+, +:drived+, +:homed+, +:relative+, +:rooted+, for
69
- # any paths that match precisely those classifications, or +nil+ if the
70
- # path is empty
71
- def classify_path path
65
+ # Classifies a path
66
+ #
67
+ # === Return
68
+ #
69
+ # One of +:absolute+, +:drived+, +:homed+, +:relative+, +:rooted+, for
70
+ # any paths that match precisely those classifications, or +nil+ if the
71
+ # path is empty
72
+ def classify_path path
72
73
 
73
- Diagnostics.check_string_parameter(path, "path") if $DEBUG
74
+ Diagnostics.check_string_parameter(path, "path") if $DEBUG
74
75
 
75
- return nil if path.nil? || path.empty?
76
+ return nil if path.nil? || path.empty?
76
77
 
77
- return :homed if path_is_homed? path
78
+ return :homed if path_is_homed? path
78
79
 
79
- vol, rem, _ = Internal_::Windows::Form.get_windows_volume(path)
80
+ vol, rem, _ = Internal_::Windows::Form.get_windows_volume(path)
80
81
 
81
- rooted = Internal_::Windows::Form.char_is_path_name_separator? rem[0]
82
+ rooted = Internal_::Windows::Form.char_is_path_name_separator? rem[0]
82
83
 
83
- if rooted
84
+ if rooted
84
85
 
85
- if vol
86
+ if vol
86
87
 
87
- return :absolute
88
- else
88
+ return :absolute
89
+ else
89
90
 
90
- return :rooted
91
- end
92
- else
91
+ return :rooted
92
+ end
93
+ else
93
94
 
94
- if vol
95
+ if vol
95
96
 
96
- return :drived
97
- else
97
+ return :drived
98
+ else
98
99
 
99
- return :relative
100
- end
101
- end
100
+ return :relative
101
+ end
102
+ end
102
103
 
103
- end
104
+ end
104
105
 
105
- # Evaluates whether the given name is malformed, according to the given
106
- # options.
107
- #
108
- # If no options are specified, the only invalid character(s) are: +'\0'+
109
- #
110
- # === Signature
111
- #
112
- # * *Options:*
113
- # - +:reject_path_name_separators+:: (boolean) Reject the path
114
- # separator character(s): +'\\'+ and +'/'+
115
- # - +:reject_path_separators+:: (boolean) Reject the path separator
116
- # character(s): +';'+
117
- # - +:reject_shell_characters+:: (boolean) Reject the shell
118
- # character(s): +'*'+, +'?'+, +'|'+
119
- def name_is_malformed? name, **options
106
+ # Evaluates whether the given name is malformed, according to the given
107
+ # options.
108
+ #
109
+ # If no options are specified, the only invalid character(s) are: +'\0'+
110
+ #
111
+ # === Signature
112
+ #
113
+ # * *Options:*
114
+ # - +:reject_path_name_separators+:: (boolean) Reject the path
115
+ # separator character(s): +'\\'+ and +'/'+
116
+ # - +:reject_path_separators+:: (boolean) Reject the path separator
117
+ # character(s): +';'+
118
+ # - +:reject_shell_characters+:: (boolean) Reject the shell
119
+ # character(s): +'*'+, +'?'+, +'|'+
120
+ def name_is_malformed? name, **options
120
121
 
121
- _Constants = ::LibPath::Constants::Windows
122
+ _Constants = ::LibPath::Constants::Windows
122
123
 
123
- if name
124
+ if name
124
125
 
125
- if options[:reject_shell_characters]
126
+ if options[:reject_shell_characters]
126
127
 
127
- return true if name =~ _Constants::InvalidCharacters::Shell::RE
128
- end
128
+ return true if name =~ _Constants::InvalidCharacters::Shell::RE
129
+ end
129
130
 
130
- if options[:reject_path_separators]
131
+ if options[:reject_path_separators]
131
132
 
132
- return true if name =~ _Constants::InvalidCharacters::PathSeparators::RE
133
- end
133
+ return true if name =~ _Constants::InvalidCharacters::PathSeparators::RE
134
+ end
134
135
 
135
- if options[:reject_path_name_separators]
136
+ if options[:reject_path_name_separators]
136
137
 
137
- return true if name =~ _Constants::InvalidCharacters::PathNameSeparators::RE
138
- end
138
+ return true if name =~ _Constants::InvalidCharacters::PathNameSeparators::RE
139
+ end
139
140
 
140
- return true if name =~ _Constants::InvalidCharacters::Innate::RE
141
+ return true if name =~ _Constants::InvalidCharacters::Innate::RE
141
142
 
142
- if '\\' == name[0] && '\\' == name[1]
143
+ if '\\' == name[0] && '\\' == name[1]
143
144
 
144
- return true if name !~ /^\\\\[^\\]+\\[^\\]+/
145
- end
145
+ return true if name !~ /^\\\\[^\\]+\\[^\\]+/
146
+ end
146
147
 
147
- false
148
- else
148
+ false
149
+ else
149
150
 
150
- true
151
- end
152
- end
151
+ true
152
+ end
153
+ end
153
154
 
154
- # Evaluates whether the given path is absolute, which means it is either
155
- # rooted (begins with '/') or is homed (is '~' or begins with '~/')
156
- #
157
- # === Signature
158
- #
159
- # * *Parameters:*
160
- # - +path+:: (String) The path to be evaluated. May not be +nil+
161
- def path_is_absolute? path
155
+ # Evaluates whether the given path is absolute, which means it is either
156
+ # rooted (begins with '/') or is homed (is '~' or begins with '~/')
157
+ #
158
+ # === Signature
159
+ #
160
+ # * *Parameters:*
161
+ # - +path+:: (String) The path to be evaluated. May not be +nil+
162
+ def path_is_absolute? path
162
163
 
163
- Diagnostics.check_string_parameter(path, "path") if $DEBUG
164
+ Diagnostics.check_string_parameter(path, "path") if $DEBUG
164
165
 
165
- return true if path_is_homed? path
166
+ return true if path_is_homed? path
166
167
 
167
- vol, rem, _ = Internal_::Windows::Form.get_windows_volume(path)
168
+ vol, rem, _ = Internal_::Windows::Form.get_windows_volume(path)
168
169
 
169
- return false unless vol
170
- return false unless rem
170
+ return false unless vol
171
+ return false unless rem
171
172
 
172
- Internal_::Windows::Form.char_is_path_name_separator? rem[0]
173
- end
173
+ Internal_::Windows::Form.char_is_path_name_separator? rem[0]
174
+ end
174
175
 
175
- # Evaluates whether the given path is "letter drived", which means that
176
- # it contains a drive specification. Given the two letter sequence 'X:'
177
- # representing any ASCII letter (a-zA-Z) and a colon, this function
178
- # recognises six sequences: +'X:'+, +'X:\'+, +'X:/'+, +'\\?\X:'+,
179
- # +'\\?\X:\'+, +'\\?\X:/'+
180
- #
181
- # === Return
182
- # - +nil+:: if it is not "drived";
183
- # - 2:: it begins with the form +'X:'+
184
- # - 3:: it begins with the form +'X:\'+ or +'X:/'+
185
- # - 6:: it begins with the form +'\\?\X:'+
186
- # - 7:: it begins with the form +'\\?\X:\'+ or +'\\?\X:/'+
187
- def path_is_letter_drived? path
176
+ # Evaluates whether the given path is "letter drived", which means that
177
+ # it contains a drive specification. Given the two letter sequence 'X:'
178
+ # representing any ASCII letter (a-zA-Z) and a colon, this function
179
+ # recognises six sequences: +'X:'+, +'X:\'+, +'X:/'+, +'\\?\X:'+,
180
+ # +'\\?\X:\'+, +'\\?\X:/'+
181
+ #
182
+ # === Return
183
+ # - +nil+:: if it is not "drived";
184
+ # - 2:: it begins with the form +'X:'+
185
+ # - 3:: it begins with the form +'X:\'+ or +'X:/'+
186
+ # - 6:: it begins with the form +'\\?\X:'+
187
+ # - 7:: it begins with the form +'\\?\X:\'+ or +'\\?\X:/'+
188
+ def path_is_letter_drived? path
188
189
 
189
- Diagnostics.check_string_parameter(path, "path") if $DEBUG
190
+ Diagnostics.check_string_parameter(path, "path") if $DEBUG
190
191
 
191
- if path.size >= 2
192
+ if path.size >= 2
192
193
 
193
- base_index = 0
194
+ base_index = 0
194
195
 
195
- if '\\' == path[0]
196
+ if '\\' == path[0]
196
197
 
197
- if '\\' == path[1]
198
+ if '\\' == path[1]
198
199
 
199
- if '?' == path[2]
200
+ if '?' == path[2]
200
201
 
201
- if '\\' == path[3]
202
+ if '\\' == path[3]
202
203
 
203
- base_index = 4
204
- end
205
- end
206
- end
207
- end
204
+ base_index = 4
205
+ end
206
+ end
207
+ end
208
+ end
208
209
 
209
- if ':' == path[base_index + 1]
210
+ if ':' == path[base_index + 1]
210
211
 
211
- if Internal_::Windows::Drive.character_is_drive_letter? path[base_index + 0]
212
+ if Internal_::Windows::Drive.character_is_drive_letter? path[base_index + 0]
212
213
 
213
- if Internal_::Windows::Form.char_is_path_name_separator? path[base_index + 2]
214
+ if Internal_::Windows::Form.char_is_path_name_separator? path[base_index + 2]
214
215
 
215
- return 4 == base_index ? 7 : 3
216
- else
216
+ return 4 == base_index ? 7 : 3
217
+ else
217
218
 
218
- return 4 == base_index ? 6 : 2
219
- end
220
- end
221
- end
222
- end
219
+ return 4 == base_index ? 6 : 2
220
+ end
221
+ end
222
+ end
223
+ end
223
224
 
224
- nil
225
- end
225
+ nil
226
+ end
226
227
 
227
- # Evaluates whether the given path is homed, which means it is '~' or
228
- # begins with '~/' or '~\'
229
- #
230
- # === Signature
231
- #
232
- # * *Parameters:*
233
- # - +path+:: (String) The path to be evaluated. May not be +nil+
234
- def path_is_homed? path
228
+ # Evaluates whether the given path is homed, which means it is '~' or
229
+ # begins with '~/' or '~\'
230
+ #
231
+ # === Signature
232
+ #
233
+ # * *Parameters:*
234
+ # - +path+:: (String) The path to be evaluated. May not be +nil+
235
+ def path_is_homed? path
235
236
 
236
- Diagnostics.check_string_parameter(path, "path") if $DEBUG
237
+ Diagnostics.check_string_parameter(path, "path") if $DEBUG
237
238
 
238
- return false unless '~' == path[0]
239
+ return false unless '~' == path[0]
239
240
 
240
- if path.size > 1
241
+ if path.size > 1
241
242
 
242
- return Internal_::Windows::Form.char_is_path_name_separator? path[1]
243
- end
243
+ return Internal_::Windows::Form.char_is_path_name_separator? path[1]
244
+ end
244
245
 
245
- true
246
- end
246
+ true
247
+ end
247
248
 
248
- # Evalutes whether the given path is rooted, which means it begins with
249
- # '/'
250
- #
251
- # === Signature
252
- #
253
- # * *Parameters:*
254
- # - +path+:: (String) The path to be evaluated. May not be +nil+
255
- def path_is_rooted? path
249
+ # Evalutes whether the given path is rooted, which means it begins with
250
+ # '/'
251
+ #
252
+ # === Signature
253
+ #
254
+ # * *Parameters:*
255
+ # - +path+:: (String) The path to be evaluated. May not be +nil+
256
+ def path_is_rooted? path
256
257
 
257
- Diagnostics.check_string_parameter(path, "path") if $DEBUG
258
+ Diagnostics.check_string_parameter(path, "path") if $DEBUG
258
259
 
259
- case path[0]
260
- when '/'
260
+ case path[0]
261
+ when '/'
261
262
 
262
- true
263
- when '\\'
263
+ true
264
+ when '\\'
264
265
 
265
- case path[1]
266
- when '\\'
266
+ case path[1]
267
+ when '\\'
267
268
 
268
- vol, rem, _ = Internal_::Windows::Form.get_windows_volume(path)
269
+ vol, rem, _ = Internal_::Windows::Form.get_windows_volume(path)
269
270
 
270
- return false unless vol
271
+ return false unless vol
271
272
 
272
- if rem && Internal_::Windows::Form.char_is_path_name_separator?(rem[0])
273
+ if rem && Internal_::Windows::Form.char_is_path_name_separator?(rem[0])
273
274
 
274
- true
275
- else
275
+ true
276
+ else
276
277
 
277
- false
278
- end
279
- else
278
+ false
279
+ end
280
+ else
280
281
 
281
- true
282
- end
283
- else
282
+ true
283
+ end
284
+ else
284
285
 
285
- if path.size > 2
286
+ if path.size > 2
286
287
 
287
- if ':' == path[1]
288
+ if ':' == path[1]
288
289
 
289
- if Internal_::Windows::Drive.character_is_drive_letter? path[0]
290
+ if Internal_::Windows::Drive.character_is_drive_letter? path[0]
290
291
 
291
- return Internal_::Windows::Form.char_is_path_name_separator? path[2]
292
- end
293
- end
294
- end
292
+ return Internal_::Windows::Form.char_is_path_name_separator? path[2]
293
+ end
294
+ end
295
+ end
295
296
 
296
- false
297
- end
298
- end
297
+ false
298
+ end
299
+ end
299
300
 
300
- # Evalutes whether the given path is UNC
301
- #
302
- # === Signature
303
- #
304
- # * *Parameters:*
305
- # - +path+:: (String) The path to be evaluated. May not be +nil+
306
- def path_is_UNC? path
301
+ # Evalutes whether the given path is UNC
302
+ #
303
+ # === Signature
304
+ #
305
+ # * *Parameters:*
306
+ # - +path+:: (String) The path to be evaluated. May not be +nil+
307
+ def path_is_UNC? path
307
308
 
308
- Diagnostics.check_string_parameter(path, "path") if $DEBUG
309
+ Diagnostics.check_string_parameter(path, "path") if $DEBUG
309
310
 
310
- return false unless '\\' == path[0]
311
- return false unless '\\' == path[1]
311
+ return false unless '\\' == path[0]
312
+ return false unless '\\' == path[1]
312
313
 
313
- _, _, frm = Internal_::Windows::Form.get_windows_volume(path)
314
+ _, _, frm = Internal_::Windows::Form.get_windows_volume(path)
314
315
 
315
- case frm
316
- when :form_2, :form_3, :form_4, :form_5, :form_6
316
+ case frm
317
+ when :form_2, :form_3, :form_4, :form_5, :form_6
317
318
 
318
- true
319
- else
319
+ true
320
+ else
320
321
 
321
- false
322
- end
323
- end
322
+ false
323
+ end
324
+ end
324
325
 
325
326
  end # module LibPath_Form_Windows_Methods
326
327
 
327
328
  # @!visibility private
328
329
  def self.extended receiver # :nodoc:
329
330
 
330
- receiver.class_eval do
331
+ receiver.class_eval do
331
332
 
332
- extend LibPath_Form_Windows_Methods
333
- end
333
+ extend LibPath_Form_Windows_Methods
334
+ end
334
335
 
335
- $stderr.puts "#{receiver} extended by #{LibPath_Form_Windows_Methods}" if $DEBUG
336
+ $stderr.puts "#{receiver} extended by #{LibPath_Form_Windows_Methods}" if $DEBUG
336
337
  end
337
338
 
338
339
  # @!visibility private
339
340
  def self.included receiver # :nodoc:
340
341
 
341
- receiver.class_eval do
342
+ receiver.class_eval do
342
343
 
343
- include LibPath_Form_Windows_Methods
344
- end
344
+ include LibPath_Form_Windows_Methods
345
+ end
345
346
 
346
- $stderr.puts "#{receiver} included #{LibPath_Form_Windows_Methods}" if $DEBUG
347
+ $stderr.puts "#{receiver} included #{LibPath_Form_Windows_Methods}" if $DEBUG
347
348
  end
348
349
 
349
350
  extend LibPath_Form_Windows_Methods
@@ -353,6 +354,6 @@ end # module Windows
353
354
  end # module Form
354
355
  end # module LibPath
355
356
 
356
- # ############################## end of file ############################# #
357
357
 
358
+ # ############################## end of file ############################# #
358
359
 
data/lib/libpath/form.rb CHANGED
@@ -3,40 +3,40 @@ require 'libpath/internal_/platform'
3
3
 
4
4
  if ::LibPath::Internal_::Platform::Constants::PLATFORM_IS_WINDOWS then
5
5
 
6
- require 'libpath/form/windows'
6
+ require 'libpath/form/windows'
7
7
  else
8
8
 
9
- require 'libpath/form/unix'
9
+ require 'libpath/form/unix'
10
10
  end
11
11
 
12
12
  module LibPath # :nodoc:
13
13
  module Form # :nodoc:
14
14
 
15
- if ::LibPath::Internal_::Platform::Constants::PLATFORM_IS_WINDOWS then
15
+ if ::LibPath::Internal_::Platform::Constants::PLATFORM_IS_WINDOWS then
16
16
 
17
- extend ::LibPath::Form::Windows
18
- include ::LibPath::Form::Windows
19
- else
17
+ extend ::LibPath::Form::Windows
18
+ include ::LibPath::Form::Windows
19
+ else
20
20
 
21
- extend ::LibPath::Form::Unix
22
- include ::LibPath::Form::Unix
23
- end
21
+ extend ::LibPath::Form::Unix
22
+ include ::LibPath::Form::Unix
23
+ end
24
24
 
25
- # @!visibility private
26
- def self.extended receiver # :nodoc:
25
+ # @!visibility private
26
+ def self.extended receiver # :nodoc:
27
27
 
28
- $stderr.puts "#{receiver} extended by #{self}" if $DEBUG
29
- end
28
+ $stderr.puts "#{receiver} extended by #{self}" if $DEBUG
29
+ end
30
30
 
31
- # @!visibility private
32
- def self.included receiver # :nodoc:
31
+ # @!visibility private
32
+ def self.included receiver # :nodoc:
33
33
 
34
- $stderr.puts "#{receiver} included #{self}" if $DEBUG
35
- end
34
+ $stderr.puts "#{receiver} included #{self}" if $DEBUG
35
+ end
36
36
 
37
37
  end # module Form
38
38
  end # module LibPath
39
39
 
40
- # ############################## end of file ############################# #
41
40
 
41
+ # ############################## end of file ############################# #
42
42