> 
> # Create connection to Midgard database
> mgd = Midgard::Core.new(username, password)
> 
> article = mgd.make(:Article, 1) # creates an object which points to
>                               # article with id = 1
>                               
> puts article.guid             # displays GUID of article 
> 
> article.get                   # fetches whole object of database
> 
> # Count number of lines in the article
> number_of_lines = 0
> article['content'].each {|line| number_of_lines = number_of_lines + 1}
> 
> # Print article title and number of lines of its content
> puts "Article '#{article['title']}' is #{number_of_lines} line(s) long"
> 




wow, this looks cool . Is this Ruby or C?



> --
> / Alexander Bokovoy
> $ cat /proc/identity >~/.signature
>   `Senior software developer and analyst for SaM-Solutions Ltd.`
> ---
> Nov 21 20:58:58 alconost kernel: VFS: Busy inodes after unmount. 
>                   Self-destruct in 5 seconds.  Have a nice day...
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


-- 
Vincent Stoessel [EMAIL PROTECTED]
Java Linux Apache Mysql Php (JLAMP) Engineer
(301) 362-1750 Mobile (410) 419-8588
AIM, MSN: xaymaca2020 , Yahoo Messenger: vks_jamaica


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to