1 # Copyright (C) 2010 Red Hat, Inc. All rights reserved.
3 # This copyrighted material is made available to anyone wishing to use,
4 # modify, copy, or redistribute it subject to the terms and conditions
5 # of the GNU General Public License v.2.
7 # You should have received a copy of the GNU General Public License
8 # along with this program; if not, write to the Free Software Foundation,
9 # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
11 # Provides a simple way of accessing the contents of files by a symbol
12 # name. Useful for erb templates.
20 @paths = p.nil? ? Array.new : p # FIXME: do we need to copy p ?
24 files = expansions(sym)
28 pn = Pathname.new("#{p}/#{f}")
35 raise RuntimeError, "unknown string entry: #{sym}"
40 ["#{sym}", "#{sym}.txt"]