mod_ruby and classes

J

Julien VIVENOT

Hi,
I ask you for help because I don't understand why mod_ruby say me there's an
error in my script whereas this one works with Ruby itself.

#-------------Script-------------#
class Rbma_query
def initialize(requete)
@requete=requete
@resultat=Array.new
end
def requete
@requete
end
def resultat
@resultat
end
def requete=(str)
@requete=str
end
def escape_pretty_html
#some code
end
def exec
#somme code
end
end

query1=Rbma_query.new
query1.requete="select all from here;"
query1.exec
print query1.escape_pretty_html

#-----------end------------#

in /usr/local/apache2/logs/error_log you can see that mod_ruby say you that
'requete=' is an undefined method !?!?!?!?!?!?!

Thx
Julien Vivenot, a french sixteen-year-old _bad_ developer

(Excuse me for my poor english)

_________________________________________________________________
MSN Search, le moteur de recherche qui pense comme vous !
http://search.msn.fr/
 
S

Simon Strandgaard

On Tue, 14 Oct 2003 02:45:51 +0900, Julien VIVENOT wrote:
[snip]
class Rbma_query
def initialize(requete)
@requete=requete
@resultat=Array.new
end [snip]
end

query1=Rbma_query.new

What happens if you initialize the Rbma_query class with an argument ?
Perhaps:

query1=Rbma_query.new("test")

query1.requete="select all from here;"
query1.exec
print query1.escape_pretty_html

in /usr/local/apache2/logs/error_log you can see that mod_ruby say you that
'requete=' is an undefined method !?!?!?!?!?!?!

Can you show us some lines from the log file ?


Julien Vivenot, a french sixteen-year-old _bad_ developer
(Excuse me for my poor english)

There is nothing wrong with your english.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,189
Latest member
CryptoTaxSoftware

Latest Threads

Top