lib/gorillib/utils/console.rb in gorillib-0.4.1pre vs lib/gorillib/utils/console.rb in gorillib-0.4.2pre
- old
+ new
@@ -34,11 +34,11 @@
def inspect() "~#{@obj.inspect}~" ; end
def to_s() @obj.to_s ; end
alias_method :pretty_inspect, :inspect
def methods() @obj.methods ; end
- # @returns the proxied object
+ # @return the proxied object
def __obj__ ; @obj ; end
# These are defined on BasicObject, delegate them along with the rest
# BasicObject.instance_methods
# => [:==, :equal?, :!, :!=, :instance_eval, :instance_exec, :__send__, :__id__]
@@ -66,26 +66,9 @@
$stderr.puts "%s %-15s <- %-30s %s -- %s" % [pref, meth.to_s[0..14], args.map(&:inspect).join(','), block, ::Kernel.caller.first]
ret = @obj.__send__(meth, *args, &block)
$stderr.puts "%s %-15s -> %s" % [pref, meth.to_s[0..14], ret.inspect] if @show_ret
ret
end
-end
-
-module Test
- module_function
-
- def create_class(name, *args, &block)
- Object.class_eval do
- remove_const(name) if self.const_defined?(name)
- const_set(name, Class.new(*args, &block))
- end
- end
-
- def example_singleton(name, *args)
- require 'singleton'
- create_class(name, *args){ include ::Singleton }
- end
-
end
class Module
#