class EnergyManagement < Environmental
  def initialize(title)
    @title = title
  end
  def objective
    convert_yaml = Environmental.yaml #YAML::load_file('nizam.yaml')
    convert_yaml["System"]["Environmental"]["children"][2]["children"] 
<< @title
    File.open("nizam_out.yaml", "w"){|f| YAML.dump(convert_yaml, f)}
  end
end

e = EnergyManagement.new(tar)
e.objective

-- 
Posted via http://www.ruby-forum.com/.