sscharter 0.5.0 → 0.5.1
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/Gemfile.lock +1 -1
- data/lib/sscharter/version.rb +1 -1
- data/lib/sscharter.rb +5 -0
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 1cf8712de608bd077ecf7de07876ffeeda198252406ed21039e8877e4ef3b0a2
|
|
4
|
+
data.tar.gz: 25ee7a29c99c52c5bccf381cf876ef1b392e09ad654f3aae5765ddf8c4e32a44
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 05d2ddfa497d740bdda3e6011baa155bb9836d6e64d5448557db89a6dc7ff9aefcc47a251c1e6bc171ede0fa4c85898b7a5c1949c403b7d602b51aba6896beca
|
|
7
|
+
data.tar.gz: 5c54bfc3a2b9ccefc1f8f08085f98ed9abd13bf938b19e60c08967e503483999a8f02447a4a17a976b825ba1dc048c814107740078072eecba6e22790f96f42c
|
data/Gemfile.lock
CHANGED
data/lib/sscharter/version.rb
CHANGED
data/lib/sscharter.rb
CHANGED
|
@@ -221,6 +221,11 @@ class Sunniesnow::Charter
|
|
|
221
221
|
end
|
|
222
222
|
|
|
223
223
|
def check
|
|
224
|
+
if !@x.is_a?(Numeric) || !@y.is_a?(Numeric)
|
|
225
|
+
raise ArgumentError, 'x and y must be numbers'
|
|
226
|
+
end
|
|
227
|
+
@x = @x.to_f
|
|
228
|
+
@y = @y.to_f
|
|
224
229
|
%i[@relative_time @speed @relative_beat @beat_speed].each do |key|
|
|
225
230
|
value = instance_variable_get key
|
|
226
231
|
raise ArgumentError, "cannot specify both #@time_key and #{key}" if @time_key && value&.!=(0)
|