summaryrefslogtreecommitdiffstats
path: root/examples/objects
diff options
context:
space:
mode:
Diffstat (limited to 'examples/objects')
-rw-r--r--examples/objects25
1 files changed, 25 insertions, 0 deletions
diff --git a/examples/objects b/examples/objects
new file mode 100644
index 000000000..4c4e6cf8b
--- /dev/null
+++ b/examples/objects
@@ -0,0 +1,25 @@
+type = filetype["colon-separated"] {
+ :recordseparator => "\n"
+ :fieldseparator => "\n"
+ :fields = %{name password uid gid ....}
+ :namefield = "name"
+}
+
+passwd = filetype["colon-separated"].new("/etc/passwd")
+shadow = filetype["colon-separated"].new("/etc/shadow")
+
+user = jointype {
+ passwd => "name"
+ shadow => "name"
+}
+
+passwd = type["/etc/passwd"]
+
+
+user.new()
+
+
+passwd["yaytest"] = {
+ :uid => 100
+ ...
+}