lib/rasti/app/utils.rb in rasti-app-0.1.2 vs lib/rasti/app/utils.rb in rasti-app-1.0.0

- old
+ new

@@ -14,9 +14,14 @@ end end end end + def namespace_of(klass) + namespace = klass.name.split('::')[0..-2].join('::') + namespace.empty? ? nil : Object.const_get(namespace) + end + end end end end \ No newline at end of file