lite-ruby 1.3.3 → 2.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +24 -0
- data/Gemfile.lock +8 -8
- data/README.md +26 -6
- data/docs/HASH.md +13 -0
- data/docs/NUMERIC.md +48 -2
- data/lib/generators/lite/ruby/templates/install.rb +18 -6
- data/lib/lite/ruby.rb +1 -14
- data/lib/lite/ruby/array.rb +218 -220
- data/lib/lite/ruby/boolean.rb +17 -19
- data/lib/lite/ruby/date.rb +13 -20
- data/lib/lite/ruby/enumerable.rb +153 -155
- data/lib/lite/ruby/formats/date_stamps.yml +34 -0
- data/lib/lite/ruby/formats/date_units.yml +42 -0
- data/lib/lite/ruby/formats/integer_roman_numerals.yml +13 -0
- data/lib/lite/ruby/formats/string_transliterations.yml +189 -0
- data/lib/lite/ruby/formats/time_stamps.yml +42 -0
- data/lib/lite/ruby/formats/time_units.yml +28 -0
- data/lib/lite/ruby/hash.rb +313 -301
- data/lib/lite/ruby/helpers/date_time_helper.rb +24 -0
- data/lib/lite/ruby/integer.rb +62 -63
- data/lib/lite/ruby/kernel.rb +19 -21
- data/lib/lite/ruby/monkey_patches.rb +16 -0
- data/lib/lite/ruby/numeric.rb +192 -177
- data/lib/lite/ruby/object.rb +128 -130
- data/lib/lite/ruby/open_struct.rb +17 -19
- data/lib/lite/ruby/range.rb +19 -21
- data/lib/lite/ruby/safe/string.rb +8 -7
- data/lib/lite/ruby/string.rb +348 -384
- data/lib/lite/ruby/struct.rb +7 -9
- data/lib/lite/ruby/time.rb +25 -30
- data/lib/lite/ruby/version.rb +1 -1
- metadata +10 -5
- data/lib/lite/ruby/configuration.rb +0 -38
- data/lib/lite/ruby/helpers/date_helper.rb +0 -107
- data/lib/lite/ruby/helpers/time_helper.rb +0 -86
@@ -0,0 +1,24 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Lite
|
4
|
+
module Ruby
|
5
|
+
module DateTimeHelper
|
6
|
+
|
7
|
+
def format(string = nil)
|
8
|
+
string ||= self.class::DEFAULT_UNIT
|
9
|
+
delimiters = string.scan(/\W+/)
|
10
|
+
formatters = string.scan(/[a-z0-9_]+/i)
|
11
|
+
string = formatters.map { |key| "%#{self.class::UNITS[key.to_s]}#{delimiters.shift}" }
|
12
|
+
strftime(string.join)
|
13
|
+
end
|
14
|
+
|
15
|
+
def stamp(key = nil)
|
16
|
+
key = key.nil? ? self.class::DEFAULT_STAMP : key.to_s
|
17
|
+
strftime(self.class::STAMPS[key])
|
18
|
+
end
|
19
|
+
|
20
|
+
alias to_format stamp
|
21
|
+
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
data/lib/lite/ruby/integer.rb
CHANGED
@@ -1,85 +1,84 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
|
4
|
-
class Integer
|
5
|
-
|
6
|
-
ROMAN_NUMERALS = {
|
7
|
-
M: 1000, CM: 900, D: 500, CD: 400, C: 100, XC: 90, L: 50,
|
8
|
-
XL: 40, X: 10, IX: 9, V: 5, IV: 4, I: 1
|
9
|
-
}.freeze
|
10
|
-
|
11
|
-
SQL_SMALLINT = 32_767
|
12
|
-
SQL_INTEGER = 2_147_483_647
|
13
|
-
SQL_BIGINT = 9_223_372_036_854_775_807
|
14
|
-
|
15
|
-
def bit(bit)
|
16
|
-
if bit.negative?
|
17
|
-
mask = (1 << ~bit)
|
18
|
-
self & ~mask
|
19
|
-
else
|
20
|
-
mask = (1 << bit)
|
21
|
-
self | mask
|
22
|
-
end
|
23
|
-
end
|
3
|
+
require 'yaml' unless defined?(YAML)
|
24
4
|
|
25
|
-
|
26
|
-
mask = (1 << bit)
|
27
|
-
(self & mask) != 0
|
28
|
-
end
|
5
|
+
class Integer
|
29
6
|
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
end
|
7
|
+
ROMAN_NUMERALS = YAML.load_file(
|
8
|
+
File.expand_path('formats/integer_roman_numerals.yml', File.dirname(__FILE__))
|
9
|
+
).freeze
|
34
10
|
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
else
|
39
|
-
self | mask
|
40
|
-
end
|
41
|
-
end
|
11
|
+
SQL_SMALLINT = 32_767
|
12
|
+
SQL_INTEGER = 2_147_483_647
|
13
|
+
SQL_BIGINT = 9_223_372_036_854_775_807
|
42
14
|
|
43
|
-
|
44
|
-
|
15
|
+
def bit(bit)
|
16
|
+
if bit.negative?
|
17
|
+
mask = (1 << ~bit)
|
18
|
+
self & ~mask
|
19
|
+
else
|
20
|
+
mask = (1 << bit)
|
21
|
+
self | mask
|
45
22
|
end
|
23
|
+
end
|
46
24
|
|
47
|
-
|
48
|
-
|
49
|
-
|
25
|
+
def bit?(bit)
|
26
|
+
mask = (1 << bit)
|
27
|
+
(self & mask) != 0
|
28
|
+
end
|
29
|
+
|
30
|
+
def bit_clear(bit)
|
31
|
+
mask = (1 << bit)
|
32
|
+
self & ~mask
|
33
|
+
end
|
50
34
|
|
51
|
-
|
52
|
-
|
35
|
+
def bitmask(mask)
|
36
|
+
if mask.negative?
|
37
|
+
self & mask
|
38
|
+
else
|
39
|
+
self | mask
|
53
40
|
end
|
41
|
+
end
|
54
42
|
|
55
|
-
|
56
|
-
|
43
|
+
def bitmask?(mask)
|
44
|
+
(self & mask) != 0
|
45
|
+
end
|
57
46
|
|
58
|
-
|
59
|
-
|
47
|
+
def combinatorial(num)
|
48
|
+
(0...num).inject(1) { |acc, i| (acc * (self - i)) / (i + 1) }
|
49
|
+
end
|
60
50
|
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
end
|
65
|
-
end
|
51
|
+
def factorial
|
52
|
+
(1..self).inject { |acc, i| acc * i } || 0
|
53
|
+
end
|
66
54
|
|
67
|
-
|
68
|
-
|
69
|
-
end
|
55
|
+
def factors
|
56
|
+
limit = Math.sqrt(self).floor
|
70
57
|
|
71
|
-
|
72
|
-
|
73
|
-
return "-#{(-self).roman_numeral}" if negative?
|
58
|
+
(1..limit).each_with_object([]) do |i, array|
|
59
|
+
next unless (self % i).zero?
|
74
60
|
|
75
|
-
|
61
|
+
sq = (self / i)
|
62
|
+
array.push(i)
|
63
|
+
array.push(sq) if sq != i
|
76
64
|
end
|
65
|
+
end
|
77
66
|
|
78
|
-
|
79
|
-
|
80
|
-
|
67
|
+
def of(&block)
|
68
|
+
Array.new(self, &block)
|
69
|
+
end
|
70
|
+
|
71
|
+
def roman_numeral
|
72
|
+
return '' if zero?
|
73
|
+
return "-#{(-self).roman_numeral}" if negative?
|
81
74
|
|
82
|
-
|
75
|
+
ROMAN_NUMERALS.each { |key, val| break "#{key}#{(self - val).roman_numeral}" if val <= self }
|
76
|
+
end
|
83
77
|
|
78
|
+
def to_time
|
79
|
+
Time.at(self)
|
84
80
|
end
|
81
|
+
|
82
|
+
alias to_t to_time unless defined?(to_t)
|
83
|
+
|
85
84
|
end
|
data/lib/lite/ruby/kernel.rb
CHANGED
@@ -1,31 +1,29 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
|
4
|
-
module Kernel
|
3
|
+
module Kernel
|
5
4
|
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
def try_eval
|
14
|
-
val = /\[\d*,?\d*,?\d*\]/.match(to_s).to_s
|
15
|
-
return val if val.nil?
|
5
|
+
# rubocop:disable Lint/RescueException, Security/Eval
|
6
|
+
def safe_eval
|
7
|
+
eval(self)
|
8
|
+
rescue Exception
|
9
|
+
self
|
10
|
+
end
|
16
11
|
|
17
|
-
|
18
|
-
|
19
|
-
|
12
|
+
def try_eval
|
13
|
+
val = /\[\d*,?\d*,?\d*\]/.match(to_s).to_s
|
14
|
+
return val if val.nil?
|
20
15
|
|
21
|
-
|
16
|
+
eval(val)
|
17
|
+
end
|
18
|
+
# rubocop:enable Lint/RescueException, Security/Eval
|
22
19
|
|
23
|
-
|
24
|
-
val = caller[depth][/`([^']*)'/, 1]
|
25
|
-
return val if depth.zero? || !val.include?('<top (required)>')
|
20
|
+
private
|
26
21
|
|
27
|
-
|
28
|
-
|
22
|
+
def caller_name(depth = 0)
|
23
|
+
val = caller[depth][/`([^']*)'/, 1]
|
24
|
+
return val if depth.zero? || !val.include?('<top (required)>')
|
29
25
|
|
26
|
+
caller[depth - 1][/`([^']*)'/, 1]
|
30
27
|
end
|
28
|
+
|
31
29
|
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'lite/ruby/array'
|
4
|
+
require 'lite/ruby/boolean'
|
5
|
+
require 'lite/ruby/date'
|
6
|
+
require 'lite/ruby/enumerable'
|
7
|
+
require 'lite/ruby/hash'
|
8
|
+
require 'lite/ruby/integer'
|
9
|
+
require 'lite/ruby/kernel'
|
10
|
+
require 'lite/ruby/numeric'
|
11
|
+
require 'lite/ruby/object'
|
12
|
+
require 'lite/ruby/open_struct'
|
13
|
+
require 'lite/ruby/range'
|
14
|
+
require 'lite/ruby/string'
|
15
|
+
require 'lite/ruby/struct'
|
16
|
+
require 'lite/ruby/time'
|
data/lib/lite/ruby/numeric.rb
CHANGED
@@ -1,244 +1,259 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
|
4
|
-
class Numeric
|
3
|
+
class Numeric
|
5
4
|
|
6
|
-
|
7
|
-
|
8
|
-
|
5
|
+
def add(num)
|
6
|
+
self + num
|
7
|
+
end
|
9
8
|
|
10
|
-
|
11
|
-
|
12
|
-
|
9
|
+
def at_least(lower)
|
10
|
+
self >= lower ? self : lower
|
11
|
+
end
|
13
12
|
|
14
|
-
|
15
|
-
|
16
|
-
|
13
|
+
def at_most(upper)
|
14
|
+
self <= upper ? self : upper
|
15
|
+
end
|
17
16
|
|
18
|
-
|
19
|
-
|
17
|
+
def close?(number, epsilon = 0.01)
|
18
|
+
return self == number if epsilon.zero?
|
20
19
|
|
21
|
-
|
22
|
-
|
20
|
+
a = to_f
|
21
|
+
b = number.to_f
|
23
22
|
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
end
|
23
|
+
if a.zero? || b.zero?
|
24
|
+
(a - b).abs < epsilon
|
25
|
+
else
|
26
|
+
(a / b - 1).abs < epsilon
|
29
27
|
end
|
28
|
+
end
|
30
29
|
|
31
|
-
|
32
|
-
|
33
|
-
|
30
|
+
def decrement(amount = 1.0)
|
31
|
+
self - amount
|
32
|
+
end
|
34
33
|
|
35
|
-
|
36
|
-
|
37
|
-
|
34
|
+
def delimit(options = {})
|
35
|
+
delimiter = options[:delimiter] || ','
|
36
|
+
separator = options[:separator] || '.'
|
38
37
|
|
39
|
-
|
40
|
-
|
38
|
+
digits, decimals = to_s.split('.')
|
39
|
+
digits = digits.reverse.chars.each_slice(3).map(&:join).join(delimiter).reverse
|
41
40
|
|
42
|
-
|
41
|
+
return digits unless decimals
|
43
42
|
|
44
|
-
|
45
|
-
|
43
|
+
[digits, decimals].join(separator)
|
44
|
+
end
|
46
45
|
|
47
|
-
|
48
|
-
|
49
|
-
|
46
|
+
def delta(num)
|
47
|
+
(self - num).abs
|
48
|
+
end
|
50
49
|
|
51
|
-
|
52
|
-
|
53
|
-
|
50
|
+
def distance(num)
|
51
|
+
self - num
|
52
|
+
end
|
54
53
|
|
55
|
-
|
56
|
-
|
54
|
+
def divide(num)
|
55
|
+
return num if num.zero?
|
57
56
|
|
58
|
-
|
59
|
-
|
57
|
+
self / num
|
58
|
+
end
|
60
59
|
|
61
|
-
|
62
|
-
|
63
|
-
|
60
|
+
def equal_to?(num)
|
61
|
+
self == num
|
62
|
+
end
|
64
63
|
|
65
|
-
|
66
|
-
|
67
|
-
|
64
|
+
def fraction
|
65
|
+
(self - truncate).abs
|
66
|
+
end
|
68
67
|
|
69
|
-
|
70
|
-
|
71
|
-
|
68
|
+
def fraction?
|
69
|
+
fraction.to_d != 0.0.to_d
|
70
|
+
end
|
72
71
|
|
73
|
-
|
74
|
-
|
75
|
-
|
72
|
+
def greater_than?(num)
|
73
|
+
num < self
|
74
|
+
end
|
76
75
|
|
77
|
-
|
78
|
-
|
79
|
-
|
76
|
+
def greater_than_or_equal_to?(num)
|
77
|
+
num <= self
|
78
|
+
end
|
80
79
|
|
81
|
-
|
82
|
-
|
83
|
-
|
80
|
+
def increment(amount = 1.0)
|
81
|
+
self + amount
|
82
|
+
end
|
84
83
|
|
85
|
-
|
86
|
-
|
87
|
-
|
84
|
+
def inside?(start, finish)
|
85
|
+
(start < self) && (finish > self)
|
86
|
+
end
|
88
87
|
|
89
|
-
|
90
|
-
|
91
|
-
|
88
|
+
def less_than?(num)
|
89
|
+
num > self
|
90
|
+
end
|
92
91
|
|
93
|
-
|
94
|
-
|
95
|
-
|
92
|
+
def less_than_or_equal_to?(num)
|
93
|
+
num >= self
|
94
|
+
end
|
96
95
|
|
97
|
-
|
98
|
-
|
99
|
-
|
96
|
+
def many?
|
97
|
+
to_f > 1.0
|
98
|
+
end
|
100
99
|
|
101
|
-
|
102
|
-
|
103
|
-
|
100
|
+
def markdown_percentage(percent)
|
101
|
+
to_f * ((100.0 - percent.to_f) / 100.0)
|
102
|
+
end
|
104
103
|
|
105
|
-
|
106
|
-
|
107
|
-
|
104
|
+
def markup_percentage(percent)
|
105
|
+
to_f + (to_f * (percent.to_f / 100.0))
|
106
|
+
end
|
108
107
|
|
109
|
-
|
110
|
-
|
108
|
+
def multiply(num)
|
109
|
+
self * num
|
110
|
+
end
|
111
111
|
|
112
|
-
|
113
|
-
|
112
|
+
def multiple_of?(number)
|
113
|
+
return zero? if number.zero?
|
114
114
|
|
115
|
-
|
116
|
-
|
117
|
-
end
|
115
|
+
modulo(number).zero?
|
116
|
+
end
|
118
117
|
|
119
|
-
|
120
|
-
|
118
|
+
def negate
|
119
|
+
-self
|
120
|
+
end
|
121
121
|
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
when 3 then 'rd'
|
126
|
-
else 'th'
|
127
|
-
end
|
128
|
-
end
|
122
|
+
def not_equal_to?(num)
|
123
|
+
self != num
|
124
|
+
end
|
129
125
|
|
130
|
-
|
131
|
-
|
132
|
-
|
126
|
+
def one?
|
127
|
+
to_d == 1.0.to_d
|
128
|
+
end
|
133
129
|
|
134
|
-
|
135
|
-
|
130
|
+
def ordinal
|
131
|
+
return 'th' if (11..13).cover?(abs % 100)
|
132
|
+
|
133
|
+
case abs % 10
|
134
|
+
when 1 then 'st'
|
135
|
+
when 2 then 'nd'
|
136
|
+
when 3 then 'rd'
|
137
|
+
else 'th'
|
136
138
|
end
|
139
|
+
end
|
137
140
|
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
+
def ordinalize
|
142
|
+
"#{self}#{ordinal}"
|
143
|
+
end
|
141
144
|
|
142
|
-
|
143
|
-
|
145
|
+
def outside?(start, finish)
|
146
|
+
(start > self) || (finish < self)
|
147
|
+
end
|
144
148
|
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
precision = options[:precision] || 2
|
149
|
-
separator = options[:separator] || '.'
|
150
|
-
string = to_s
|
151
|
-
|
152
|
-
string << separator unless string.include?(separator)
|
153
|
-
ljust_count = string.split(separator).first.length
|
154
|
-
ljust_count += (string.count(separator) + precision) if precision.positive?
|
155
|
-
|
156
|
-
if ljust_count >= string.length
|
157
|
-
string.ljust(ljust_count, pad_number.to_s)
|
158
|
-
else
|
159
|
-
string[0..(ljust_count - 1)]
|
160
|
-
end
|
161
|
-
end
|
162
|
-
# rubocop:enable Metrics/AbcSize, Metrics/MethodLength
|
149
|
+
def pad(options = {})
|
150
|
+
pad_number = options[:pad_number] || 0
|
151
|
+
precision = options[:precision] || 3
|
163
152
|
|
164
|
-
|
165
|
-
|
153
|
+
to_s.rjust(precision, pad_number.to_s)
|
154
|
+
end
|
166
155
|
|
167
|
-
|
168
|
-
|
156
|
+
# rubocop:disable Metrics/AbcSize, Metrics/MethodLength
|
157
|
+
def pad_precision(options = {})
|
158
|
+
pad_number = options[:pad_number] || 0
|
159
|
+
precision = options[:precision] || 2
|
160
|
+
separator = options[:separator] || '.'
|
161
|
+
string = to_s
|
169
162
|
|
170
|
-
|
171
|
-
|
172
|
-
|
163
|
+
string << separator unless string.include?(separator)
|
164
|
+
ljust_count = string.split(separator).first.length
|
165
|
+
ljust_count += (string.count(separator) + precision) if precision.positive?
|
173
166
|
|
174
|
-
|
175
|
-
(
|
167
|
+
if ljust_count >= string.length
|
168
|
+
string.ljust(ljust_count, pad_number.to_s)
|
169
|
+
else
|
170
|
+
string[0..(ljust_count - 1)]
|
176
171
|
end
|
172
|
+
end
|
173
|
+
# rubocop:enable Metrics/AbcSize, Metrics/MethodLength
|
177
174
|
|
178
|
-
|
179
|
-
|
180
|
-
end
|
175
|
+
def percentage_of(number)
|
176
|
+
return 0 if zero? || number.zero?
|
181
177
|
|
182
|
-
|
183
|
-
|
178
|
+
(self / number.to_f) * 100.0
|
179
|
+
end
|
184
180
|
|
185
|
-
|
186
|
-
|
181
|
+
def power(num)
|
182
|
+
self**num
|
183
|
+
end
|
187
184
|
|
188
|
-
|
189
|
-
|
190
|
-
|
185
|
+
def range(value)
|
186
|
+
(self - value)..(self + value)
|
187
|
+
end
|
191
188
|
|
192
|
-
|
193
|
-
|
189
|
+
def root(num)
|
190
|
+
self**(1.0 / num)
|
191
|
+
end
|
194
192
|
|
195
|
-
|
196
|
-
|
193
|
+
def round_down(num = 0)
|
194
|
+
int, dec = to_f.to_s.split('.')
|
197
195
|
|
198
|
-
|
199
|
-
|
196
|
+
"#{int}.#{dec[0...num]}".to_f
|
197
|
+
end
|
200
198
|
|
201
|
-
|
202
|
-
|
199
|
+
def subtract(num)
|
200
|
+
self - num
|
201
|
+
end
|
203
202
|
|
204
|
-
|
205
|
-
|
203
|
+
def to_currency(options = {})
|
204
|
+
unit = options[:unit] || '$'
|
206
205
|
|
207
|
-
|
208
|
-
|
209
|
-
end
|
206
|
+
"#{unit}#{pad_precision(options.only(:precision))}"
|
207
|
+
end
|
210
208
|
|
211
|
-
|
212
|
-
|
209
|
+
def to_nearest_value(values = [])
|
210
|
+
return self if values.length.zero?
|
213
211
|
|
214
|
-
|
215
|
-
|
212
|
+
value = values.first
|
213
|
+
difference = (self - value).abs
|
216
214
|
|
217
|
-
|
215
|
+
values.each do |val|
|
216
|
+
next unless (self - val).abs < difference
|
217
|
+
|
218
|
+
difference = (self - val).abs
|
219
|
+
value = val
|
218
220
|
end
|
219
221
|
|
220
|
-
|
221
|
-
|
222
|
+
value
|
223
|
+
end
|
222
224
|
|
223
|
-
|
224
|
-
|
225
|
+
def to_percentage(options = {})
|
226
|
+
unit = options[:unit] || '%'
|
225
227
|
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
228
|
+
"#{pad_precision(options.only(:precision))}#{unit}"
|
229
|
+
end
|
230
|
+
|
231
|
+
def to_range
|
232
|
+
negative? ? self..-self : -self..self
|
233
|
+
end
|
234
|
+
|
235
|
+
def within?(number, epsilon = 0.01)
|
236
|
+
return number == self if epsilon.zero?
|
232
237
|
|
233
|
-
|
234
|
-
|
235
|
-
alias gteq? greater_than_or_equal_to?
|
236
|
-
alias inequal_to? not_equal_to?
|
237
|
-
alias ineq? not_equal_to?
|
238
|
-
alias lt? less_than?
|
239
|
-
alias lteq? less_than_or_equal_to?
|
240
|
-
alias not_eq? not_equal_to?
|
241
|
-
alias plus_minus range
|
238
|
+
alpha = to_f
|
239
|
+
beta = number.to_f
|
242
240
|
|
241
|
+
if alpha.zero? || beta.zero?
|
242
|
+
(alpha - beta).abs < epsilon
|
243
|
+
else
|
244
|
+
(alpha / beta - 1).abs < epsilon
|
245
|
+
end
|
243
246
|
end
|
247
|
+
|
248
|
+
alias eq? equal_to?
|
249
|
+
alias gt? greater_than?
|
250
|
+
alias gteq? greater_than_or_equal_to?
|
251
|
+
alias inequal_to? not_equal_to?
|
252
|
+
alias ineq? not_equal_to?
|
253
|
+
alias lt? less_than?
|
254
|
+
alias lteq? less_than_or_equal_to?
|
255
|
+
alias none? zero?
|
256
|
+
alias not_eq? not_equal_to?
|
257
|
+
alias plus_minus range
|
258
|
+
|
244
259
|
end
|