lib/procemon/mpatch/string.rb in procemon-0.1.5 vs lib/procemon/mpatch/string.rb in procemon-0.2.0
- old
+ new
@@ -73,35 +73,6 @@
end
end
self.scan(/#{str}/).count
end
- # create process object from valid process string
- def to_proc(binding=nil)
- begin
-
- if !self.include?('Proc.new') && !self.include?('lambda')
- raise ArgumentError, "string obj is not a valid process source"
- end
-
- if binding.nil?
- return eval(self)
- else
- return eval(self,binding)
- end
-
- end
- end
-
- # this is a helper to create source strings from procs
- def source_formater_for_line_sub
- self.gsub!(';',"\n")
- self.gsub!(/\bdo\b/,'{')
- self.gsub!(/\bend\b/,'}')
-
- self.frequency(/{/)+
- self.frequency(/def/)-
- self.frequency(/}/)
- end
-
-
end
\ No newline at end of file