diff --git a/blah.cr b/blah.cr new file mode 100644 index 0000000..07d5c0b --- /dev/null +++ b/blah.cr @@ -0,0 +1,30 @@ +require "./src/dodb.cr" + +class Car + include JSON::Serializable + + property name : String + property color : String + property keywords : Array(String) + + def initialize(@name, @color, @keywords) + end +end + +# Database creation +db = DODB::DataBase(Car).new "db-cars" + +# Adding an element to the db +db << Car.new "Corvet", "red", ["elegant", "fast"] + +# Reaching all objects in the db +db.each do |car| + pp! car +end + +# Reaching all objects in the db with their key. +db.each_with_index do |car,key| + pp! car, key +end + +db.delete 0 diff --git a/graphs/troffrc b/graphs/troffrc new file mode 100644 index 0000000..8624241 --- /dev/null +++ b/graphs/troffrc @@ -0,0 +1,69 @@ +.\" Startup file for troff. +. +.\" This is tested by pic. +.nr 0p 0 +. +.\" Load composite mappings. +.do mso composite.tmac +. +.\" Load generic fallback mappings. +.do mso fallbacks.tmac +. +.\" Use .do here, so that it works with -C. +.\" The groff command defines the .X string if the -X option was given. +.ie r.X .do ds troffrc!ps Xps.tmac +.el .do ds troffrc!ps ps.tmac +.do ds troffrc!pdf pdf.tmac +.do ds troffrc!dvi dvi.tmac +.do ds troffrc!X75 X.tmac +.do ds troffrc!X75-12 X.tmac +.do ds troffrc!X100 X.tmac +.do ds troffrc!X100-12 X.tmac +.do ds troffrc!ascii tty.tmac +.do ds troffrc!latin1 tty.tmac +.do ds troffrc!utf8 tty.tmac +.do ds troffrc!cp1047 tty.tmac +.do ds troffrc!lj4 lj4.tmac +.do ds troffrc!lbp lbp.tmac +.do ds troffrc!html html.tmac +.do if d troffrc!\*[.T] \ +. do mso \*[troffrc!\*[.T]] +.do rm troffrc!ps troffrc!Xps troffrc!dvi troffrc!X75 troffrc!X75-12 \ +troffrc!X100 troffrc!X100-12 troffrc!lj4 troff!lbp troffrc!html troffrc!pdf +. +.\" Test whether we work under EBCDIC and map the no-breakable space +.\" character accordingly. +.do ie '\[char97]'a' \ +. do tr \[char160]\~ +.el \ +. do tr \[char65]\~ +. +.\" Set the hyphenation language to 'us'. +.do hla us +. +.\" Disable hyphenation: +.\" Do not load hyphenation patterns and exceptions. +.\"do hpf hyphen.us +.\"do hpfa hyphenex.us +. +.\" Disable adjustment by default, +.\" such that manuals look similar with groff and mandoc(1). +.\".ad l +.\".de ad +.\".. +.\" Handle paper formats. +.do mso papersize.tmac +. +.\" Handle PS images. +.do mso pspic.tmac +.do mso pdfpic.tmac +. +.\" ==================================================================== +.\" Editor settings +.\" ==================================================================== +. +.\" Local Variables: +.\" mode: nroff +.\" fill-column: 72 +.\" End: +.\" vim: set filetype=groff textwidth=72: