From: "Daniel G." Date: 2010-09-10T08:58:39+09:00 Subject: Re: Method not inherit? --0016e6d7e93d00757e048fdc5a38 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hello, That method is inherited, but only instances can use it: require 'rdfmodelmodule' class Mine < RdfModelModule::RdfModel def something_else self.rdf_schema end end # This works Mine.new.rdf_schema Mine.new.something_else Daniel Gayt=E1n 2010/9/9 Manuel Manuelson > Hi, > > I'm a newbie in Ruby and created this module: > > require 'couchrest_model' > module RdfModelModule > > class RdfModel < CouchRest::Model::Base > def rdf_schema > p 'hello' > end > end > > end > > > When I create a new class based no this class like this: > > require 'rdfmodelmodule' > class Mine < RdfModelModule::RdfModel > rdf_schema > end > > I'm getting this error: > NoMethodError: undefined method `rdf_schema' for Mine:Class > > > This is a bit confusing! Why is rdf_schema not inherit by the 'Mine' > class?? > > Cheers, > Manuel > -- > Posted via http://www.ruby-forum.com/. > > --0016e6d7e93d00757e048fdc5a38--