xqsr3 0.38.2 → 0.39.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (111) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +15 -6
  3. data/examples/count_word_frequencies.md +12 -12
  4. data/examples/count_word_frequencies.rb +4 -4
  5. data/lib/xqsr3/array_utilities/join_with_or.rb +47 -47
  6. data/lib/xqsr3/array_utilities.rb +2 -2
  7. data/lib/xqsr3/command_line_utilities/map_option_string.rb +60 -60
  8. data/lib/xqsr3/command_line_utilities.rb +2 -2
  9. data/lib/xqsr3/containers/frequency_map.rb +399 -399
  10. data/lib/xqsr3/containers/multi_map.rb +448 -448
  11. data/lib/xqsr3/containers.rb +3 -3
  12. data/lib/xqsr3/conversion/bool_parser.rb +51 -51
  13. data/lib/xqsr3/conversion/integer_parser.rb +87 -87
  14. data/lib/xqsr3/conversion.rb +3 -3
  15. data/lib/xqsr3/diagnostics/exception_utilities.rb +145 -145
  16. data/lib/xqsr3/diagnostics/exceptions/with_cause.rb +90 -90
  17. data/lib/xqsr3/diagnostics/inspect_builder.rb +80 -80
  18. data/lib/xqsr3/diagnostics.rb +3 -3
  19. data/lib/xqsr3/doc_.rb +130 -130
  20. data/lib/xqsr3/extensions/array/join_with_or.rb +9 -9
  21. data/lib/xqsr3/extensions/enumerable/collect_with_index.rb +12 -12
  22. data/lib/xqsr3/extensions/enumerable/detect_map.rb +35 -35
  23. data/lib/xqsr3/extensions/enumerable/unique.rb +29 -28
  24. data/lib/xqsr3/extensions/hash/deep_transform.rb +1 -1
  25. data/lib/xqsr3/extensions/hash/except.rb +16 -16
  26. data/lib/xqsr3/extensions/hash/has_match.rb +10 -10
  27. data/lib/xqsr3/extensions/hash/match.rb +10 -10
  28. data/lib/xqsr3/extensions/hash/slice.rb +11 -11
  29. data/lib/xqsr3/extensions/hash.rb +1 -1
  30. data/lib/xqsr3/extensions/integer/to_s_grp.rb +118 -0
  31. data/lib/xqsr3/extensions/integer.rb +3 -0
  32. data/lib/xqsr3/extensions/io/writelines.rb +28 -28
  33. data/lib/xqsr3/extensions/kernel/integer.rb +20 -20
  34. data/lib/xqsr3/extensions/kernel/raise_with_options.rb +8 -8
  35. data/lib/xqsr3/extensions/kernel.rb +1 -0
  36. data/lib/xqsr3/extensions/string/ends_with.rb +1 -1
  37. data/lib/xqsr3/extensions/string/map_option_string.rb +4 -4
  38. data/lib/xqsr3/extensions/string/nil_if_empty.rb +1 -1
  39. data/lib/xqsr3/extensions/string/nil_if_whitespace.rb +1 -1
  40. data/lib/xqsr3/extensions/string/quote_if.rb +1 -1
  41. data/lib/xqsr3/extensions/string/starts_with.rb +1 -1
  42. data/lib/xqsr3/extensions/string/to_bool.rb +8 -8
  43. data/lib/xqsr3/extensions/string/to_symbol.rb +1 -1
  44. data/lib/xqsr3/extensions/string/truncate.rb +1 -1
  45. data/lib/xqsr3/extensions/test/unit/assert_eql.rb +10 -7
  46. data/lib/xqsr3/extensions/test/unit/assert_false.rb +9 -6
  47. data/lib/xqsr3/extensions/test/unit/assert_not.rb +9 -6
  48. data/lib/xqsr3/extensions/test/unit/assert_not_eql.rb +10 -7
  49. data/lib/xqsr3/extensions/test/unit/assert_raise_with_message.rb +61 -61
  50. data/lib/xqsr3/extensions/test/unit/assert_subclass_of.rb +10 -7
  51. data/lib/xqsr3/extensions/test/unit/assert_superclass_of.rb +10 -7
  52. data/lib/xqsr3/extensions/test/unit/assert_true.rb +9 -6
  53. data/lib/xqsr3/extensions/test/unit/assert_type_has_instance_methods.rb +39 -36
  54. data/lib/xqsr3/extensions.rb +5 -5
  55. data/lib/xqsr3/hash_utilities/deep_transform.rb +65 -65
  56. data/lib/xqsr3/hash_utilities/key_matching.rb +77 -77
  57. data/lib/xqsr3/hash_utilities.rb +3 -3
  58. data/lib/xqsr3/internal_/test_unit_version_.rb +83 -83
  59. data/lib/xqsr3/io/writelines.rb +122 -120
  60. data/lib/xqsr3/quality/parameter_checking.rb +445 -445
  61. data/lib/xqsr3/quality.rb +2 -2
  62. data/lib/xqsr3/string_utilities/ends_with.rb +59 -59
  63. data/lib/xqsr3/string_utilities/nil_if_empty.rb +28 -28
  64. data/lib/xqsr3/string_utilities/nil_if_whitespace.rb +29 -29
  65. data/lib/xqsr3/string_utilities/quote_if.rb +50 -50
  66. data/lib/xqsr3/string_utilities/starts_with.rb +59 -59
  67. data/lib/xqsr3/string_utilities/to_symbol.rb +75 -75
  68. data/lib/xqsr3/string_utilities/truncate.rb +55 -55
  69. data/lib/xqsr3/string_utilities.rb +8 -8
  70. data/lib/xqsr3/version.rb +12 -12
  71. data/test/performance/frequency_map.rb +12 -12
  72. data/test/scratch/test_assert_raise_with_message.rb +11 -11
  73. data/test/unit/array_utilities/tc_join_with_or.rb +140 -140
  74. data/test/unit/command_line_utilities/tc_map_option_string.rb +18 -18
  75. data/test/unit/containers/tc_frequency_map.rb +591 -591
  76. data/test/unit/containers/tc_multi_map.rb +558 -558
  77. data/test/unit/conversion/tc_integer_parser.rb +72 -72
  78. data/test/unit/conversion/tc_to_bool.rb +25 -25
  79. data/test/unit/diagnostics/exceptions/tc_with_cause.rb +165 -165
  80. data/test/unit/diagnostics/tc_exception_utilities.rb +156 -156
  81. data/test/unit/extensions/enumerable/tc_collect_with_index.rb +14 -14
  82. data/test/unit/extensions/enumerable/tc_detect_map.rb +20 -20
  83. data/test/unit/extensions/enumerable/tc_unique.rb +34 -34
  84. data/test/unit/extensions/hash/tc_deep_transform.rb +22 -22
  85. data/test/unit/extensions/hash/tc_except.rb +28 -28
  86. data/test/unit/extensions/hash/tc_slice.rb +13 -13
  87. data/test/unit/extensions/integer/tc_to_s_grp.rb +60 -0
  88. data/test/unit/extensions/integer/ts_all.rb +12 -0
  89. data/test/unit/extensions/io/tc_writelines.rb +149 -77
  90. data/test/unit/extensions/kernel/tc_integer.rb +75 -75
  91. data/test/unit/extensions/kernel/tc_raise_with_options.rb +155 -155
  92. data/test/unit/extensions/object/tc_inspect.rb +50 -50
  93. data/test/unit/extensions/string/tc_bool.tb +24 -24
  94. data/test/unit/extensions/string/tc_ends_with.rb +53 -53
  95. data/test/unit/extensions/string/tc_map_option_string.rb +15 -15
  96. data/test/unit/extensions/string/tc_nil_if_empty.rb +8 -8
  97. data/test/unit/extensions/string/tc_nil_if_whitespace.rb +8 -8
  98. data/test/unit/extensions/string/tc_quote_if.rb +18 -18
  99. data/test/unit/extensions/string/tc_starts_with.rb +53 -53
  100. data/test/unit/extensions/string/tc_to_symbol.rb +26 -26
  101. data/test/unit/extensions/string/tc_truncate.rb +18 -18
  102. data/test/unit/extensions/test/unit/tc_assert_raise_with_message.rb +16 -16
  103. data/test/unit/extensions/test/unit/tc_assert_subclass_of.rb +9 -9
  104. data/test/unit/extensions/test/unit/tc_assert_superclass_of.rb +9 -9
  105. data/test/unit/hash_utilities/tc_has_match.rb +70 -70
  106. data/test/unit/hash_utilities/tc_match.rb +83 -83
  107. data/test/unit/io/tc_writelines.rb +166 -106
  108. data/test/unit/quality/tc_parameter_checking.rb +389 -389
  109. data/test/unit/string_utilities/tc_truncate.rb +27 -27
  110. data/test/unit/tc_version.rb +15 -15
  111. metadata +6 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c48e07ee8ea8be5920c2fb02b227dfe0c8af895c6e257de99868608d34eed42e
4
- data.tar.gz: 1f1c1563a264faabe4c6b569b95669cead6a79f87ce41f10e8f9a83676ea168d
3
+ metadata.gz: a9ed73f4599f60f4dfbbd40d39d1967cccdf74e69b5f317d859128f04777551c
4
+ data.tar.gz: 07b8984f99e23d99ce1fd1cd05fc5b553ddb587e732d8b6d0deac758c95644f2
5
5
  SHA512:
6
- metadata.gz: added1f222ca39d06266bf71a00b65e51fbc1c9cca5250bbf41f786a55f78ec62d3100c87e82947644301e6c8263af493aa169e1a35dbf8a5dfe193fce9bb871
7
- data.tar.gz: d3fc5c37fbc541bc0bc862593e5966fb5a8187b344c176017907dc1bbe22489d1c84510a96c95097c0a4d40c26b6ea6deedfd77a39be3c9616af342373baf8af
6
+ metadata.gz: b78b409d39d78d7e8fc44a31db077e8638d64f91545212ad2ed2921b4a39a5f2d1fc266ffb71ed16b7fb3fd48f947923135144401144942774e93a61938715d3
7
+ data.tar.gz: a0b0e40fcc75a20cf3f2203920c807819b88270ae1e4cb987166243e829a05a9d1288b7cc1e2923f3895504cf83272cdb89de92be5b053705dcb04be9c63c492
data/README.md CHANGED
@@ -1,4 +1,5 @@
1
- # xqsr3
1
+ # xqsr3 <!-- omit in toc -->
2
+
2
3
  e**X**tensions by fine **Q**uantum for **S**tandard **R**uby and **3**rd-party libraries
3
4
 
4
5
  [![Gem Version](https://badge.fury.io/rb/xqsr3.svg)](https://badge.fury.io/rb/xqsr3)
@@ -11,12 +12,17 @@ It has **no dependencies** on any other non-standard library.
11
12
 
12
13
  It may be pronounced (lamely) as "excusers".
13
14
 
14
- ## Table of Contents
15
+ ## Table of Contents <!-- omit in toc -->
15
16
 
16
- 1. [Introduction](#introduction)
17
- 2. [Installation](#installation)
18
- 3. [Components](#components)
19
- 4. [Project Information](#project-information)
17
+ - [Introduction](#introduction)
18
+ - [Installation](#installation)
19
+ - [Components](#components)
20
+ - [Examples](#examples)
21
+ - [Project Information](#project-information)
22
+ - [Where to get help](#where-to-get-help)
23
+ - [Contribution guidelines](#contribution-guidelines)
24
+ - [Related projects](#related-projects)
25
+ - [License](#license)
20
26
 
21
27
  ## Installation
22
28
 
@@ -104,3 +110,6 @@ and a development dependency of:
104
110
 
105
111
  **xqsr3** is released under the 3-clause BSD license. See [LICENSE](./LICENSE) for details.
106
112
 
113
+
114
+ <!-- ########################### end of file ########################### -->
115
+
@@ -32,9 +32,9 @@ words.each { |word| fm << word }
32
32
 
33
33
  fm.each_by_frequency do |word, frequency|
34
34
 
35
- next if 1 == frequency
35
+ next if 1 == frequency
36
36
 
37
- $stdout.puts "\t#{word}\t#{frequency}"
37
+ $stdout.puts "\t#{word}\t#{frequency}"
38
38
  end
39
39
  puts
40
40
 
@@ -45,9 +45,9 @@ fm = FrequencyMap::ByElement[*words]
45
45
 
46
46
  fm.each_by_frequency do |word, frequency|
47
47
 
48
- next if 1 == frequency
48
+ next if 1 == frequency
49
49
 
50
- $stdout.puts "\t#{word}\t#{frequency}"
50
+ $stdout.puts "\t#{word}\t#{frequency}"
51
51
  end
52
52
  puts
53
53
 
@@ -67,16 +67,16 @@ When run, this produces the following output:
67
67
  Analyse DATA words via FrequencyMap
68
68
 
69
69
  1. Manually (showing items with 2+ occurrences):
70
- in 3
71
- dolor 2
72
- dolore 2
73
- ut 2
70
+ in 3
71
+ dolor 2
72
+ dolore 2
73
+ ut 2
74
74
 
75
75
  2. Via ByElement (showing items with 2+ occurrences):
76
- in 3
77
- dolor 2
78
- dolore 2
79
- ut 2
76
+ in 3
77
+ dolor 2
78
+ dolore 2
79
+ ut 2
80
80
  ```
81
81
 
82
82
 
@@ -23,9 +23,9 @@ words.each { |word| fm << word }
23
23
 
24
24
  fm.each_by_frequency do |word, frequency|
25
25
 
26
- next if 1 == frequency
26
+ next if 1 == frequency
27
27
 
28
- $stdout.puts "\t#{word}\t#{frequency}"
28
+ $stdout.puts "\t#{word}\t#{frequency}"
29
29
  end
30
30
  puts
31
31
 
@@ -36,9 +36,9 @@ fm = FrequencyMap::ByElement[*words]
36
36
 
37
37
  fm.each_by_frequency do |word, frequency|
38
38
 
39
- next if 1 == frequency
39
+ next if 1 == frequency
40
40
 
41
- $stdout.puts "\t#{word}\t#{frequency}"
41
+ $stdout.puts "\t#{word}\t#{frequency}"
42
42
  end
43
43
  puts
44
44
 
@@ -2,16 +2,16 @@
2
2
  # ######################################################################## #
3
3
  # File: lib/xqsr3/array_utilities/join_with_or.rb
4
4
  #
5
- # Purpose: Definition of the Xqsr3::ArrayUtilities::JoinWithOr module
5
+ # Purpose: Definition of the ::Xqsr3::ArrayUtilities::JoinWithOr module
6
6
  #
7
7
  # Created: 7th December 2017
8
- # Updated: 11th December 2023
8
+ # Updated: 29th March 2024
9
9
  #
10
10
  # Home: http://github.com/synesissoftware/xqsr3
11
11
  #
12
12
  # Author: Matthew Wilson
13
13
  #
14
- # Copyright (c) 2019-2023, Matthew Wilson and Synesis Information Systems
14
+ # Copyright (c) 2019-2024, Matthew Wilson and Synesis Information Systems
15
15
  # Copyright (c) 2017-2019, Matthew Wilson and Synesis Software
16
16
  # All rights reserved.
17
17
  #
@@ -59,50 +59,50 @@ module ArrayUtilities
59
59
  # +include+-able module that provides sequence-joining functionality
60
60
  module JoinWithOr
61
61
 
62
- extend self
63
-
64
- # Joins an array with grammatical appropriateness (with an 'or')
65
- #
66
- # === Signature
67
- #
68
- # * *Parameters:*
69
- # - +ar+ (Array) The array whose contents are to be joined
70
- # - +options+ (Hash) Options that control the behaviour of the method
71
- #
72
- # * *Options:*
73
- # - +:or+ (String) A string that is used instead of 'or'
74
- # - +:oxford_comma+ (boolean) Determines whether an Oxford comma will be used. Default is +true+
75
- # - +:quote_char+ (String) The quote character. Default is empty string ''
76
- # - +:separator+ (String) The separator character. Default is ','
77
- def join_with_or ar, **options
78
-
79
- ::Xqsr3::Quality::ParameterChecking.check_parameter ar, 'ar', type: ::Array, allow_nil: true
80
- ::Xqsr3::Quality::ParameterChecking.check_parameter options, 'options', type: ::Hash, allow_nil: false
81
-
82
- ::Xqsr3::Quality::ParameterChecking.check_parameter options[:or], ':or', type: ::String, option: true, allow_nil: true
83
- ::Xqsr3::Quality::ParameterChecking.check_parameter options[:oxford_comma], ':oxford_comma', types: [ ::FalseClass, ::TrueClass ], option: true, allow_nil: true
84
- ::Xqsr3::Quality::ParameterChecking.check_parameter options[:quote_char], ':quote_char', type: ::String, option: true, allow_nil: true
85
- ::Xqsr3::Quality::ParameterChecking.check_parameter options[:separator], ':separator', type: ::String, option: true, allow_nil: true
86
-
87
- return '' if ar.nil?
88
- return '' if ar.empty?
89
-
90
- separator = options[:separator] || ','
91
- or_word = options[:or] || 'or'
92
- ox_comma = (options.has_key?(:oxford_comma) && !options[:oxford_comma]) ? '' : separator
93
- quote_char = options[:quote_char]
94
-
95
- ar = ar.map { |v| "#{quote_char}#{v}#{quote_char}" } if quote_char
96
-
97
- case ar.size
98
- when 1
99
- ar[0]
100
- when 2
101
- "#{ar[0]} #{or_word} #{ar[1]}"
102
- else
103
- "#{ar[0...-1].join(separator + ' ')}#{ox_comma} #{or_word} #{ar[-1]}"
104
- end
105
- end
62
+ extend self
63
+
64
+ # Joins an array with grammatical appropriateness (with an 'or')
65
+ #
66
+ # === Signature
67
+ #
68
+ # * *Parameters:*
69
+ # - +ar+ (Array) The array whose contents are to be joined
70
+ # - +options+ (Hash) Options that control the behaviour of the method
71
+ #
72
+ # * *Options:*
73
+ # - +:or+ (String) A string that is used instead of 'or'
74
+ # - +:oxford_comma+ (boolean) Determines whether an Oxford comma will be used. Default is +true+
75
+ # - +:quote_char+ (String) The quote character. Default is empty string ''
76
+ # - +:separator+ (String) The separator character. Default is ','
77
+ def join_with_or ar, **options
78
+
79
+ ::Xqsr3::Quality::ParameterChecking.check_parameter ar, 'ar', type: ::Array, allow_nil: true
80
+ ::Xqsr3::Quality::ParameterChecking.check_parameter options, 'options', type: ::Hash, allow_nil: false
81
+
82
+ ::Xqsr3::Quality::ParameterChecking.check_parameter options[:or], ':or', type: ::String, option: true, allow_nil: true
83
+ ::Xqsr3::Quality::ParameterChecking.check_parameter options[:oxford_comma], ':oxford_comma', types: [ ::FalseClass, ::TrueClass ], option: true, allow_nil: true
84
+ ::Xqsr3::Quality::ParameterChecking.check_parameter options[:quote_char], ':quote_char', type: ::String, option: true, allow_nil: true
85
+ ::Xqsr3::Quality::ParameterChecking.check_parameter options[:separator], ':separator', type: ::String, option: true, allow_nil: true
86
+
87
+ return '' if ar.nil?
88
+ return '' if ar.empty?
89
+
90
+ separator = options[:separator] || ','
91
+ or_word = options[:or] || 'or'
92
+ ox_comma = (options.has_key?(:oxford_comma) && !options[:oxford_comma]) ? '' : separator
93
+ quote_char = options[:quote_char]
94
+
95
+ ar = ar.map { |v| "#{quote_char}#{v}#{quote_char}" } if quote_char
96
+
97
+ case ar.size
98
+ when 1
99
+ ar[0]
100
+ when 2
101
+ "#{ar[0]} #{or_word} #{ar[1]}"
102
+ else
103
+ "#{ar[0...-1].join(separator + ' ')}#{ox_comma} #{or_word} #{ar[-1]}"
104
+ end
105
+ end
106
106
 
107
107
  end # module JoinWithOr
108
108
 
@@ -1,10 +1,10 @@
1
1
 
2
2
  %w{
3
3
 
4
- join_with_or
4
+ join_with_or
5
5
  }.each do |name|
6
6
 
7
- require File.join(File.dirname(__FILE__), 'array_utilities', name)
7
+ require File.join(File.dirname(__FILE__), 'array_utilities', name)
8
8
  end
9
9
 
10
10
 
@@ -2,17 +2,17 @@
2
2
  # ######################################################################## #
3
3
  # File: lib/xqsr3/command_line_utilities/map_option_string.rb
4
4
  #
5
- # Purpose: Definition of the Xqsr3::CommandLineUtilities::MapOptionString
5
+ # Purpose: Definition of the ::Xqsr3::CommandLineUtilities::MapOptionString
6
6
  # module
7
7
  #
8
8
  # Created: 15th April 2016
9
- # Updated: 11th December 2023
9
+ # Updated: 29th March 2024
10
10
  #
11
11
  # Home: http://github.com/synesissoftware/xqsr3
12
12
  #
13
13
  # Author: Matthew Wilson
14
14
  #
15
- # Copyright (c) 2019-2023, Matthew Wilson and Synesis Information Systems
15
+ # Copyright (c) 2019-2024, Matthew Wilson and Synesis Information Systems
16
16
  # Copyright (c) 2016-2019, Matthew Wilson and Synesis Software
17
17
  # All rights reserved.
18
18
  #
@@ -64,85 +64,85 @@ module CommandLineUtilities
64
64
  # * ::Xqsr3::CommandLineUtilities::MapOptionString#map_option_string
65
65
  module MapOptionString
66
66
 
67
- def self.included includer # :nodoc:
67
+ def self.included includer # :nodoc:
68
68
 
69
- raise TypeError, "module #{self} cannot be included into #{includer} because it does not respond to to_str" unless includer.method_defined? :to_str
70
- end
69
+ raise TypeError, "module #{self} cannot be included into #{includer} because it does not respond to to_str" unless includer.method_defined? :to_str
70
+ end
71
71
 
72
- private
73
- # @!visibility private
74
- module MapOptionString_Helper_ # :nodoc: all
72
+ private
73
+ # @!visibility private
74
+ module MapOptionString_Helper_ # :nodoc: all
75
75
 
76
- def self.map_option_string_with_options_ s, option_strings, options
76
+ def self.map_option_string_with_options_ s, option_strings, options
77
77
 
78
- h = {}
78
+ h = {}
79
79
 
80
- option_strings.each do |os|
80
+ option_strings.each do |os|
81
81
 
82
- t = os.dup
83
- v = os.dup
82
+ t = os.dup
83
+ v = os.dup
84
84
 
85
- if t =~ /\[.+?\]/
85
+ if t =~ /\[.+?\]/
86
86
 
87
- k = ''
88
- v = ''
87
+ k = ''
88
+ v = ''
89
89
 
90
- while t =~ /\[(.+?)\]/
90
+ while t =~ /\[(.+?)\]/
91
91
 
92
- k += $1
93
- v += "#$`#$1"
94
- t = $'
95
- end
92
+ k += $1
93
+ v += "#$`#$1"
94
+ t = $'
95
+ end
96
96
 
97
- v += t
98
- else
97
+ v += t
98
+ else
99
99
 
100
- k = v
101
- end
100
+ k = v
101
+ end
102
102
 
103
- h[k] = v
104
- h[v] = v
105
- end
103
+ h[k] = v
104
+ h[v] = v
105
+ end
106
106
 
107
- r = h[s]
107
+ r = h[s]
108
108
 
109
- if r
109
+ if r
110
110
 
111
- r = ::Xqsr3::StringUtilities::ToSymbol.string_to_symbol r
112
- end
111
+ r = ::Xqsr3::StringUtilities::ToSymbol.string_to_symbol r
112
+ end
113
113
 
114
- r
115
- end
116
- end
117
- public
114
+ r
115
+ end
116
+ end
117
+ public
118
118
 
119
- # Attempts to translate the value of a given string according
120
- # to a collection of options strings
121
- #
122
- # === Signature
123
- #
124
- # * *Parameters:*
125
- # - +s+ (::String) The string to be mapped
126
- # - +option_strings+ ([::String]) An array of strings against which the mapping will be performed
127
- # - +options+ (Hash) Options that control the behaviour of the method
128
- def self.map_option_string_from_string s, option_strings, options = {}
119
+ # Attempts to translate the value of a given string according
120
+ # to a collection of options strings
121
+ #
122
+ # === Signature
123
+ #
124
+ # * *Parameters:*
125
+ # - +s+ (::String) The string to be mapped
126
+ # - +option_strings+ ([::String]) An array of strings against which the mapping will be performed
127
+ # - +options+ (Hash) Options that control the behaviour of the method
128
+ def self.map_option_string_from_string s, option_strings, options = {}
129
129
 
130
- MapOptionString_Helper_.map_option_string_with_options_ s, option_strings, options
131
- end
130
+ MapOptionString_Helper_.map_option_string_with_options_ s, option_strings, options
131
+ end
132
132
 
133
- # Attempts to translate the (string) value of the receiver according
134
- # to a collection of options strings
135
- #
136
- # === Signature
137
- #
138
- # * *Parameters:*
139
- # - +option_strings+ ([::String]) An array of strings against which the mapping will be performed
140
- def map_option_string option_strings, options = {}
133
+ # Attempts to translate the (string) value of the receiver according
134
+ # to a collection of options strings
135
+ #
136
+ # === Signature
137
+ #
138
+ # * *Parameters:*
139
+ # - +option_strings+ ([::String]) An array of strings against which the mapping will be performed
140
+ def map_option_string option_strings, options = {}
141
141
 
142
- s = self.kind_of?(::String) ? self : self.to_str
142
+ s = self.kind_of?(::String) ? self : self.to_str
143
143
 
144
- MapOptionString_Helper_.map_option_string_with_options_ s, option_strings, options
145
- end
144
+ MapOptionString_Helper_.map_option_string_with_options_ s, option_strings, options
145
+ end
146
146
  end # module MapOptionString
147
147
 
148
148
  end # module CommandLineUtilities
@@ -1,10 +1,10 @@
1
1
 
2
2
  %w{
3
3
 
4
- map_option_string
4
+ map_option_string
5
5
  }.each do |name|
6
6
 
7
- require File.join(File.dirname(__FILE__), 'command_line_utilities', name)
7
+ require File.join(File.dirname(__FILE__), 'command_line_utilities', name)
8
8
  end
9
9
 
10
10