Connecting Tech Pros Worldwide Help | Site Map

how to load property files in ruby using Property class

Newbie
 
Join Date: Nov 2007
Posts: 1
#1: Nov 30 '07
Hello,

http://www.jroller.com/djspiewak/entry/properties_files_in_ruby

From this link i came to know that there is some Property class in ruby.
So, i tried using it like this
props=Properties.new
props.load 'file.properties'

But while running it is giving me NameError for Properties.

Help will be appreciated.
Regards,
mousumi
Newbie
 
Join Date: Jan 2008
Posts: 1
#2: Jan 25 '08

re: how to load property files in ruby using Property class


This will work out of the box (unless your properties files has a "invalid format"):

require 'soap/property'
properties = SOAP::Property.load("myfile.properties")

Cheers,
Sergio Fierens
Reply


Similar Ruby / Ruby on Rails bytes