ascheink-active_yaml 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +14 -19
- data/VERSION +1 -1
- data/active_yaml.gemspec +1 -1
- metadata +1 -1
data/README.rdoc
CHANGED
@@ -1,32 +1,27 @@
|
|
1
1
|
= active_yaml
|
2
2
|
|
3
|
-
Read YAML
|
4
|
-
|
5
|
-
For example,
|
3
|
+
Read YAML with ActiveRecord-like syntax. For example,
|
6
4
|
|
7
5
|
db/yaml/senator.yml
|
8
|
-
<tt>
|
9
|
-
Gillibrand:
|
10
|
-
first_name: Kirsten
|
11
|
-
party: D
|
12
|
-
Schumer:
|
13
|
-
first_name: Charles
|
14
|
-
party: D
|
15
|
-
</tt>
|
16
6
|
|
7
|
+
Gillibrand:
|
8
|
+
first_name: Kirsten
|
9
|
+
party: D
|
10
|
+
Schumer:
|
11
|
+
first_name: Charles
|
12
|
+
party: D
|
17
13
|
|
18
14
|
models/senator.rb
|
19
|
-
|
20
|
-
class Senator < ActiveYAML
|
21
|
-
end
|
22
|
-
</tt>
|
15
|
+
|
16
|
+
class Senator < ActiveYAML
|
17
|
+
end
|
23
18
|
|
24
19
|
Then,
|
25
20
|
|
26
|
-
Senator.find_all
|
27
|
-
Senator.find_all_by_party('D')
|
28
|
-
@s = Senator.find("Schumer")
|
29
|
-
@s.first_name
|
21
|
+
Senator.find_all
|
22
|
+
Senator.find_all_by_party('D')
|
23
|
+
@s = Senator.find("Schumer")
|
24
|
+
@s.first_name
|
30
25
|
|
31
26
|
etc.
|
32
27
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.1
|
data/active_yaml.gemspec
CHANGED