modlr 0.0.3 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/modlr/version.rb +1 -1
- data/lib/modlr.rb +14 -8
- metadata +1 -1
data/lib/modlr/version.rb
CHANGED
data/lib/modlr.rb
CHANGED
@@ -1,14 +1,20 @@
|
|
1
1
|
module Modlr
|
2
|
-
|
3
|
-
|
4
|
-
|
2
|
+
##
|
3
|
+
# modlr :class, number_of_records, {:field => :type, :field => type}
|
4
|
+
#
|
5
|
+
# If I have a User class, with fields name (string), and age (int), then
|
6
|
+
# `modlr :user, 100, {:name => :name, :age => :age}`
|
7
|
+
# will create 100 user records with names and ages which make sense.
|
8
|
+
#
|
9
|
+
#
|
10
|
+
##
|
5
11
|
|
6
|
-
module
|
7
|
-
def modlr(
|
12
|
+
module ModlrSetup
|
13
|
+
def modlr(model, number, &args)
|
14
|
+
puts model, number, args
|
8
15
|
end
|
16
|
+
|
9
17
|
end
|
10
|
-
end
|
11
18
|
|
12
|
-
|
13
|
-
include Modlr
|
19
|
+
|
14
20
|
end
|