sortify 0.1.4 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e84867d37d9efc16c5ee29d296e261b6046acddb
4
- data.tar.gz: 56560b44ea5f6d01c15917c20275ce441565c050
3
+ metadata.gz: 5a60ffba3504659ddb15dbe59ba1b160d9d70d62
4
+ data.tar.gz: edf80cefe2f40bdfa2604a519a3276d9d0366a90
5
5
  SHA512:
6
- metadata.gz: db9a4367e424d452437fd610d97685648ab3839017f8648033d1e571582d7015b73f053611dc1fc6752bfa70879d2b588ba83c1def71eaf787b26b804bf5cae1
7
- data.tar.gz: 3a405e1f36e78d806ca7ccad2c6f545bf3f7eace83c581b9fca7e0c3d9d5d8469782eb5789c0d5a19a8dfb193d96cf22ee18473f91dd99072d75b7a3e5d5b323
6
+ metadata.gz: f7b0fac97bfb3eee0095de9fef5b6a1fa1d8cb18c35cdcfba67c1d7b35b00e5a5e68f88aa26250cd69f1bd8731b99ea93748af6ed960ffa9d76dc3da2a66e7c3
7
+ data.tar.gz: e381d9f20cb32bd179ebdd607357964a1997e22b607c17bed4c2325dedf901e1b4de22329da0a0f4dbe6bb81ef39c6972e621b7df77ae5824cbf44f4f0f7e10a
data/lib/sortify.rb CHANGED
@@ -3,6 +3,10 @@ module Sortify
3
3
  @sort_options ||= []
4
4
  name = name.to_sym
5
5
 
6
+ if self.respond_to?(name)
7
+ raise ArgumentError, "Could not create sort option, There is an existing method with this name."
8
+ end
9
+
6
10
  begin
7
11
  scope name, body
8
12
  rescue ArgumentError => e
@@ -1,3 +1,3 @@
1
1
  module Sortify
2
- VERSION = "0.1.4"
2
+ VERSION = "0.1.5"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sortify
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Melody