lib/obj.rb in scrivito_sdk-0.18.1 vs lib/obj.rb in scrivito_sdk-0.30.0.rc1
- old
+ new
@@ -1,3 +1,17 @@
-# empty implementation for Obj
-# only unsed in case the app does not define Obj itself
-::Obj = Class.new(Scrivito::BasicObj)
+# The class +Obj+ should be overridden by the application (see example).
+# The SDK provides methods for {Obj} through it's abstract base class, {Scrivito::BasicObj}.
+# The Scrivito SDK provides this empty implementation for {Obj}
+# which will only be used in case the app does not define the class {Obj} itself.
+# @example
+# # in app/models/obj.rb
+# class Obj < Scrivito::BasicObj
+# # put your custom extensions that apply to every Obj here
+# end
+#
+# # in app/models/page.rb
+# class Page < Obj
+# # put custom extensions that only apply to Objs with class Page here
+# end
+# @api public
+class Obj < Scrivito::BasicObj
+end