/[freeride]/freeride/freebase/databus.rb
ViewVC logotype

Diff of /freeride/freebase/databus.rb

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

revision 1.11 by richkilmer, Fri Sep 13 04:31:56 2002 UTC revision 1.12 by richkilmer, Mon Sep 23 13:56:23 2002 UTC
# Line 134  module FreeBASE Line 134  module FreeBASE
134        def manager=(manager)        def manager=(manager)
135          raise "Slot #{@path} already has an active manager: #{@manager}" if @manager          raise "Slot #{@path} already has an active manager: #{@manager}" if @manager
136          @manager = manager          @manager = manager
137            notify(:notify_slot_managed)
138        end        end
139                
140        ##        ##
# Line 209  module FreeBASE Line 210  module FreeBASE
210        ##        ##
211        # Iterates over the sub-slots and link slots        # Iterates over the sub-slots and link slots
212        #        #
213          # recurse:: [Boolean=false] if true, recurses all child slots
214        # yeild:: [FreeBASE::DataBus::Slot] The child slot        # yeild:: [FreeBASE::DataBus::Slot] The child slot
215        #        #
216        def each_slot        def each_slot(recurse=false, &block)
217          @slots.each_value {|slot| yield slot}          raise "Must supply a block as an iterator" unless block_given?
218          @links.each_value {|slot| yield slot}          @slots.each_value do |slot|
219              yield slot
220              slot.each_slot(recurse, &block) if recurse
221            end
222            @links.each_value do |slot|
223              yield slot
224              slot.each_slot(recurse, &block) if recurse
225            end
226        end        end
227                
228        ##        ##
# Line 367  module FreeBASE Line 376  module FreeBASE
376        end        end
377                
378        ##        ##
379        # calls proc.call if this is a proc slot        # calls proc.call if this is a proc slot (invoke is an alias)
380        #        #
381        def call(*args)        def call(*args)
382          self.proc.call(*args)          self.proc.call(*args)

Legend:
Removed from v.1.11  
changed lines
  Added in v.1.12

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