[Nitro] help with og!

zimba-tm zimba.tm at gmail.com
Thu Nov 24 18:13:45 EST 2005


Hi,

Og relies on the property method to "enchant" a class and store it. I
guess there is another more elegant way to do it, but I don't know it.
I help this will be a help for you to start.

Example :
=========
class A
end

class B
  property :name, String
  has_many :as, A
end
=========

This should work.

On 24/11/05, itsme213 <itsme213 at hotmail.com> wrote:
> aaargh!
>
> og looks very promising, but i am very frustrated at even getting started.
>
>
> -----------
> require 'og'
>
> class A
> end
>
> class B
>  has_many :as, A
> end
>
>
> #=> error: undefined method `has_many' for B:Class (NoMethodError)
> Process ruby exited with code 1
>
> -----------
> require 'og'
>
> class A
> end
>
> class B
>  property :a, A
>  has_many :as, A
> end
>
>
> #=> no error
>
> -----------
>
> What on earth is going on?
>
> perhaps i am doing something very dumb, but have no idea where to look.
>
> maybe rdoc will help, but i can't even see or build any rdocs.
>
> help!!
> _______________________________________________
> Nitro-general mailing list
> Nitro-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/nitro-general
>


--
Cheers,
  zimba

http://zimba.oree.ch




More information about the Nitro-general mailing list