The Ruby Binding

18th August 2011

Ruby Binding Specification

The Ruby binding is maintained by Laurent Sansonetti <lrz@chopine.be>

The ZOOM binding specification for Ruby can be found at rubyforge.org/projects/ruby-zoom

Canonical Sample Program

To give a flavour of the Ruby binding, here is ZOOM's equivalent of the ``Hello World'' program: a tiny Z39.50 client that fetches and displays the MARC record for Farlow & Brett Surman's The Complete Dinosaur from the Library of Congress.

require 'zoom'

ZOOM::Connection.open('z3950.loc.gov', 7090) do |conn|
    conn.database_name = 'Voyager'
    conn.preferred_record_syntax = 'USMARC'
    rset = conn.search('@attr 1=7 0253333490')
    p rset[0]
end

Ruby Binding Implementations

We currently have the following implementations of the Ruby binding:

Feedback to <mike@indexdata.com> is welcome!