validation_reflection-active_model 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -26,6 +26,14 @@ module ValidationReflection
26
26
  def kind
27
27
  self.macro.to_s.match(/\w+_(\w+)_\w+/)[1].to_sym
28
28
  end
29
+
30
+ def kind=(kind)
31
+ self.instance_variable_set('@macro', "validates_#{kind}_of".to_sym)
32
+ end
33
+
34
+ def attributes
35
+ [self.name]
36
+ end
29
37
  end
30
38
  end
31
39
 
metadata CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
4
4
  prerelease: false
5
5
  segments:
6
6
  - 0
7
- - 1
7
+ - 2
8
8
  - 0
9
- version: 0.1.0
9
+ version: 0.2.0
10
10
  platform: ruby
11
11
  authors:
12
12
  - Brian Cardarella