Ask a Question related to Ruby, Design and Development.
-
paul vudmaska #1
fyi : rexml eruby cache'ing
>>Please avoid top-posting.<<
Is this a top-posting? How do i submit a sub
top-posting?
Anyway i submitted a post about rexml perhaps
intermittantly caching a file. I figured out why.
before, i was loading the xml like this...
$global =
REXML::Document.new(File.new('xml/global.xml'))
and not closing file.
now, instead, i do this
$globalFile = File.new('xml/global.xml')
$global = REXML::Document.new($globalFile)
....
$globalFile.close
and close $globalFile at the end.
Anyway, alls groovy now.
THanks,:P
__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
[url]http://sitebuilder.yahoo.com[/url]
paul vudmaska Guest
-
eRuby and URL rewriting
I am in the process of doing some web page authoring using eRuby. My question is this-- how do I access the post/get information in URL... -
CGI Authentication in eruby
Hello, What is the way to implement the functionality of php $PHP_AUTH_USER and $PHP_AUTH_PW in Ruby? I've looked on CGI and CGI:Session. but... -
my mod_ruby doesn't like my eruby
Hi, I'm not able to make eruby work with mod_ruby for some reason and I haven't found any solutions by looking at cases with a similar problem.... -
soap4r 1.4.8.1 with REXML 2.7.1 - no REXML::VERSION_MAJOR
I grabbed the latest soap4r and had a go with the wsdl driver, only to come to an abrupt stop with the following ... -
calling eruby from code?
I've found documentation for running eruby(1) from the command line and for configuring Apache to handle eruby templates. Do you know how to... -
Austin Ziegler #2
Re: fyi : rexml eruby cache'ing
On Sat, 13 Sep 2003 11:55:19 +0900, paul vudmaska wrote:
There are two Ruby idioms that you may prefer to this.> now, instead, i do this
> $globalFile = File.new('xml/global.xml')
> $global = REXML::Document.new($globalFile)
> $globalFile.close
1. File.open with a block:
globalXML = nil
File.open("xml/global.xml") do |f|
globalXML = REXML::Document.new(f)
end
This implicitly closes the file at the end of the block.
2. File.read:
globalXML = REXML::Document.new(File.read("xml/global.xml"))
-austin
P.S. Top posting is the practice of replying before the quoted text. It is
particularly frowned upon when the entire quoted message is included
following the reply.
--
austin ziegler * [email]austin@halostatue.ca[/email] * Toronto, ON, Canada
software designer * pragmatic programmer * 2003.09.13
* 00.31.58
Austin Ziegler Guest
-
paul vudmaska #3
Re: fyi : rexml eruby cache'ing
>>
There are two Ruby idioms that you may prefer to this.
1. File.open with a block:
globalXML = nil
File.open("xml/global.xml") do |f|
globalXML = REXML::Document.new(f)
end
This implicitly closes the file at the end of the
block.
2. File.read:
globalXML =
REXML::Document.new(File.read("xml/global.xml"))
<<
Thanks for the tips! File.read, this will be ideal for
me!
__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
[url]http://sitebuilder.yahoo.com[/url]
paul vudmaska Guest



Reply With Quote

