active_flags 0.3.0 → 0.3.1

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
  SHA256:
3
- metadata.gz: 04d4f132fab19c0376a2a86331ebc79c309dae8e8e6a3de21a5f73295af63646
4
- data.tar.gz: b1f08e89de858e78adb8713a2fdee131801db75aeb5abc265918a0f2b5d78d07
3
+ metadata.gz: 2e7a7ae6d57b7d260e5544dba935de74fe2f8a4bcd8559c3479eb19bd8daa13d
4
+ data.tar.gz: f3b8b5e4a0a20cf9b9b860dc82bb6e145f7432d273fa757ae211d38745db67d1
5
5
  SHA512:
6
- metadata.gz: 0adf7d4c13094ba72e1b168e1398310c46c1e33346ffc9aa49e82366ed811cd18861099b7346d2bc42a3772b1577fc16b6533a3a51a6422d0308b6d99b62640c
7
- data.tar.gz: 44b07703f575acebcbd4af7c17f2b5101cdc118293e6c425cfd1298b5d18f5b265c8cd84c27b191958a376917f36ed01b0ffd4bcec9abc871110c497f5d513c1
6
+ metadata.gz: d93513fae1dce7c4bcf8fe483ddf5c3092abd870144207be8394cee0fedbb4bd1568d898bc0c275c6d22c3924d09e946ebe2806f6c8708b679438647038e9cfd
7
+ data.tar.gz: 19de22753247e3fdfd7482171871f115b20784a4d84b6fdbeb32a2ee8cddb76d873de1f4cb2e20e18d49feaca52aa52fcd31141bab4a1c034027304ed43a758d
@@ -25,8 +25,11 @@ module ActiveFlags
25
25
  end
26
26
  end
27
27
 
28
- def method_missing(method_name, *args)
29
- super(method_name, *args) unless method_name.to_s.include?(prefix = 'flagged_as_')
28
+ private
29
+
30
+ def method_missing(method_name, *args, &block)
31
+ return super unless method_name.to_s.include?(prefix = 'flagged_as_')
32
+
30
33
  different_from = method_name.to_s.starts_with?('not')
31
34
  flag = method_name.to_s.gsub(different_from ? "not_#{prefix}" : prefix, '')
32
35
  condition = { active_flags_flags: { value: stringify(args[0]) } }
@@ -1,3 +1,3 @@
1
1
  module ActiveFlags
2
- VERSION = '0.3.0'
2
+ VERSION = '0.3.1'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_flags
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nathan Huberty