/[freeride]/freeride/test/adapter.rb
ViewVC logotype

Diff of /freeride/test/adapter.rb

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.3 by ljulliar, Fri Feb 1 09:19:46 2002 UTC revision 1.4 by ljulliar, Thu May 30 15:23:09 2002 UTC
# Line 1  Line 1 
1  # Purpose: FreeRIDE databus adapter test  # Purpose: FreeBASE databus adapter test
2  #      #    
3  # $Id$  # $Id$
4  #  #
5  # Authors:  Rich Kilmer <rich@infoether.com>  # Authors:  Rich Kilmer <rich@infoether.com>
6  # Contributors:  # Contributors:
7  #  #
8  # This file is part of the FreeRIDE project  # This file is part of the FreeBASE project
9  #  #
10  # This application is free software; you can redistribute it and/or  # This application is free software; you can redistribute it and/or
11  # modify it under the terms of the Ruby license defined in the  # modify it under the terms of the Ruby license defined in the
# Line 14  Line 14 
14  # Copyright (c) 2001 Rich Kilmer. All rights reserved.  # Copyright (c) 2001 Rich Kilmer. All rights reserved.
15  #  #
16    
17  require 'freeride/databus'  require 'freebase/databus'
18    
19  db = FreeRIDE::DataBus.new  db = FreeBASE::DataBus.new
20    
21  slots = [ db["/FirstName"], db["/MiddleName"], db["/LastName"], db["/FullName"] ]  slots = [ db["/FirstName"], db["/MiddleName"], db["/LastName"], db["/FullName"] ]
22    
23  FreeRIDE::DataBus::Adapter.new(slots) do |msg, slot|  FreeBASE::DataBus::Adapter.new(slots) do |msg, slot|
24          if slot.name=="FullName"          if slot.name=="FullName"
25                  slot["/FirstName"].data, slot["/MiddleName"].data, slot["/LastName"].data = slot["/FullName"].data.split                  slot["/FirstName"].data, slot["/MiddleName"].data, slot["/LastName"].data = slot["/FullName"].data.split
26          else          else

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26