simple_form_object 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/simple_form_object.rb +8 -0
- data/lib/simple_form_object/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e8dd644a6cb88e4057c15feaff7462a29761414d
|
4
|
+
data.tar.gz: bf80b76bf161b737f248496fad9b6c76158abce6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e44ef8cad43c19f3ba05dbb9677ec94f1188afbfb4e65faa56942080762bd02c192dcbe42580ef931b0ff6e717d811b2c23b0416df95567851f73e77a4cf3102
|
7
|
+
data.tar.gz: 8595468a9090311557763c9f3c29c002e5d268e6f3cd4b0537128a05a7914b89bf5d3ba1b9856300c3f692922c54789631d0e95665d34fae8f78cbc673780288
|
data/lib/simple_form_object.rb
CHANGED
@@ -38,6 +38,14 @@ module SimpleFormObject
|
|
38
38
|
end
|
39
39
|
end
|
40
40
|
|
41
|
+
def attributes
|
42
|
+
attribs = {}
|
43
|
+
self.class._attributes.each do |a|
|
44
|
+
attribs[a.name] = self.send(a.name)
|
45
|
+
end
|
46
|
+
attribs
|
47
|
+
end
|
48
|
+
|
41
49
|
class Attribute
|
42
50
|
def initialize(name, type = nil, options)
|
43
51
|
@name = name
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: simple_form_object
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Leonard Garvey
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-01-
|
11
|
+
date: 2014-01-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activemodel
|