| |
 |
|
| Computers Forum Index » Computer Languages (Ruby) » execute script in context of a member method |
|
Page 1 of 1 |
|
| Author |
Message |
| Achim Domma |
Posted: Thu Jun 08, 2006 4:35 pm |
|
|
|
Guest
|
Hi,
I have a class wrapping some watir code, which can be used like:
app = HelperClass.new(...)
app.login "user","user"
app.textbox 3, "some text"
app.save
I want to split this into a runner script and a script which looks like:
login "user","user"
textbox 3, "some text"
save
I think this should be possible without too much effort in ruby, but I
don't get it. Any hint is very welcome!
regards,
Achim |
|
|
| Back to top |
|
|
|
| Robert Klemme |
Posted: Thu Jun 08, 2006 5:02 pm |
|
|
|
Guest
|
Achim Domma wrote:
Quote: Hi,
I have a class wrapping some watir code, which can be used like:
app = HelperClass.new(...)
app.login "user","user"
app.textbox 3, "some text"
app.save
I want to split this into a runner script and a script which looks like:
login "user","user"
textbox 3, "some text"
save
I think this should be possible without too much effort in ruby, but I
don't get it. Any hint is very welcome!
regards,
Achim
app = Helper.new
app.instance_eval do
login "user","user"
textbox 3, "some text"
save
end
robert |
|
|
| Back to top |
|
|
|
|
|
All times are GMT
The time now is Sun Nov 08, 2009 4:23 am
|
|