[Gridflow-cvs] [svn] commit: r3392 - in /trunk/base: flow_objects.rb main.rb

gridflow-cvs at artengine.ca gridflow-cvs at artengine.ca
Tue Apr 1 14:25:24 EDT 2008


Author: matju
Date: Tue Apr  1 14:25:24 2008
New Revision: 3392

Log:
remove doc methods

Modified:
    trunk/base/flow_objects.rb
    trunk/base/main.rb

Modified: trunk/base/flow_objects.rb
==============================================================================
--- trunk/base/flow_objects.rb (original)
+++ trunk/base/flow_objects.rb Tue Apr  1 14:25:24 2008
@@ -451,9 +451,9 @@
     end
     send_out 0,-1
   end
-  doc:_1_list,"list to search into"
-  doc:_0_float,"float to find in that list"
-  doc_out:_0_float,"position of the incoming float in the stored list"
+  #doc:_1_list,"list to search into"
+  #doc:_0_float,"float to find in that list"
+  #doc_out:_0_float,"position of the incoming float in the stored list"
 }
 
 module Gooey # to be included in any FObject class
@@ -1035,10 +1035,10 @@
   def _0_symbol(s) send_out 0, :symbol, s.to_s.gsub(@from, @to).intern end
   def _1_symbol(from) @from = Regexp.new(from.to_s.gsub(/`/,"\\")) end
   def _2_symbol(to)   @to = to.to_s.gsub(/`/,"\\") end
-  doc:_0_symbol,"a string to transform"
-  doc:_1_symbol,"a regexp pattern to be found inside of the string"
-  doc:_2_symbol,"a replacement for the found pattern"
-  doc_out:_0_symbol,"the transformed string"
+  #doc:_0_symbol,"a string to transform"
+  #doc:_1_symbol,"a regexp pattern to be found inside of the string"
+  #doc:_2_symbol,"a replacement for the found pattern"
+  #doc_out:_0_symbol,"the transformed string"
 }
 
 FObject.subclass("memstat",1,1) {
@@ -1047,9 +1047,8 @@
     send_out 0, Float(f.gets.split(" ")[22]) / 1024.0
     f.close
   end
-  doc:_0_bang,"lookup process stats for the currently running pd+ruby "+
-  	"and figure out how much RAM it uses."
-  doc_out:_0_float,"virtual size of RAM in kilobytes (includes swapped out and shared memory)"
+  #doc:_0_bang,"lookup process stats for the currently running pd+ruby and figure out how much RAM it uses."
+  #doc_out:_0_float,"virtual size of RAM in kilobytes (includes swapped out and shared memory)"
 }
 
 FObject.subclass("sendgui",1,0) {
@@ -1057,7 +1056,7 @@
     GridFlow.gui x.join(" ").gsub(/`/,";")+"\n"
   end
   install "sys_vgui", 1, 0
-  doc:_0_list,"a Tcl/Tk command to send to the pd client."
+  #doc:_0_list,"a Tcl/Tk command to send to the pd client."
 }
 
 end # module GridFlow

Modified: trunk/base/main.rb
==============================================================================
--- trunk/base/main.rb (original)
+++ trunk/base/main.rb Tue Apr  1 14:25:24 2008
@@ -91,18 +91,6 @@
 		attr_reader :ninlets
 		attr_reader :noutlets
 		def foreign_name; @foreign_name if defined? @foreign_name end
-		def doc(selector=nil,text=nil)
-			return @doc if not selector
-			if not defined? @doc; @doc={}; end
-			return @doc[selector] if not text
-			@doc[selector] = text
-		end
-		def doc_out(selector=nil,text=nil)
-			return @doc_out if not selector
-			if not defined? @doc_out; @doc_out={}; end
-			return @doc_out[selector] if not text
-			@doc_out[selector] = text
-		end
 		def inspect; foreign_name or super; end
 		# should it recurse into superclasses?
 		def gfattrs; @gfattrs={} if not defined? @gfattrs; @gfattrs end
@@ -129,7 +117,6 @@
 		qlass.instance_eval{qlass.module_eval(&b)}
 	end
 	attr_reader :outlets
-	attr_accessor :properties
 	def initialize2; end
 	def connect outlet, object, inlet
 		@outlets ||= []
@@ -139,9 +126,7 @@
 	def self.name_lookup sym
 		qlasses = GridFlow.fclasses
 		qlass = qlasses[sym.to_s]
-		if not qlass
-			raise "object class '#{sym}' not found"
-		end
+		raise "object class '#{sym}' not found" if not qlass
 		qlass
 	end
 	def self.[](*m)
@@ -157,10 +142,7 @@
 	end
 	#def inspect; if args then "[#{args}]" else super end end
 	def inspect; "some object" end
-	def initialize(*argv)
-		@properties = {}
-		@init_messages = []
-	end
+	def initialize(*argv) @init_messages = [] end
 	def _0_help; self.class.help end
 	def _0_get(s=nil)
 		s=s.intern if String===s
@@ -178,9 +160,7 @@
 end
 
 begin
-	@cpu_hertz = (0...3).map {
-		GridFlow.estimate_cpu_clock
-	}.sort[1] # median of three tries
+	@cpu_hertz = (0...3).map {GridFlow.estimate_cpu_clock}.sort[1] # median of three tries
 rescue Exception => e
 	GridFlow.post e,e.backtrace
 end



More information about the Gridflow-cvs mailing list