lib/finix/utils.rb in finix-0.11 vs lib/finix/utils.rb in finix-0.12

- old
+ new

@@ -1,6 +1,11 @@ module Finix module Utils + def eval_class(slf, name) + mod = slf.class.name.split("::").first unless slf.kind_of? Class or slf.kind_of? Module + mod = slf.name.split("::").first if mod.nil? + self.instance_eval "#{mod}::#{name}" + end def callable(callable_or_not) callable_or_not.respond_to?(:call) ? callable_or_not : lambda { callable_or_not } end \ No newline at end of file