sortify 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/sortify.rb +4 -2
- data/lib/sortify/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e84867d37d9efc16c5ee29d296e261b6046acddb
|
4
|
+
data.tar.gz: 56560b44ea5f6d01c15917c20275ce441565c050
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: db9a4367e424d452437fd610d97685648ab3839017f8648033d1e571582d7015b73f053611dc1fc6752bfa70879d2b588ba83c1def71eaf787b26b804bf5cae1
|
7
|
+
data.tar.gz: 3a405e1f36e78d806ca7ccad2c6f545bf3f7eace83c581b9fca7e0c3d9d5d8469782eb5789c0d5a19a8dfb193d96cf22ee18473f91dd99072d75b7a3e5d5b323
|
data/lib/sortify.rb
CHANGED
@@ -25,12 +25,14 @@ module Sortify
|
|
25
25
|
|
26
26
|
if @sort_options.include? sort_option
|
27
27
|
self.send(sort_option)
|
28
|
-
|
28
|
+
elsif sort_option.empty?
|
29
29
|
begin
|
30
30
|
self.send(@default_sort_option)
|
31
31
|
rescue
|
32
|
-
raise NoMethodError, "The default sort option you provided, '#{@default_sort_option.to_s}' does not exist."
|
32
|
+
raise NoMethodError, "The default sort option you provided, '#{@default_sort_option.to_s}', does not exist."
|
33
33
|
end
|
34
|
+
else
|
35
|
+
raise NoMethodError, "The sort option you provided, '#{sort_option}', does not exist."
|
34
36
|
end
|
35
37
|
end
|
36
38
|
end
|
data/lib/sortify/version.rb
CHANGED