Namespace in Ripple?

Thomas Fee gasbeing at gmail.com
Fri Jul 1 11:25:14 EDT 2011


I'm currently using Ripple with the application name prepended to the
typename in an effort to artificially create a namespace for app, to not
collide with other apps, e.g.

class TcwebRoot
  include Ripple::Document
  property :typed_root_symbol, String, :presence => true
  key_on   :typed_root_symbol
  # et cetera
end

Where "Tcweb" is the appname functioning as a namespace prefix. The object
class should ideally be called just "Root". I would prefer to not have
"Tcweb" mangled into the classname.

Does Ripple allow this sort of thing?...

Ripple::namespace("Tcweb")
class Root
  include Ripple::Document
  property :typed_root_symbol, String, :presence => true
  # et cetera
end

Note:
With my name mangling, plus Ripple's name mapping conventions, a TcwebRoot
object is currently queried like this...
http://172.22.59.51:8098/riak/tcweb_roots/%24200-KOR%7C0
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.basho.com/pipermail/riak-users_lists.basho.com/attachments/20110701/dacf90f6/attachment.html>


More information about the riak-users mailing list