lib/yml_reader.rb in yml_reader-0.5 vs lib/yml_reader.rb in yml_reader-0.6
- old
+ new
@@ -23,9 +23,13 @@
#
# Loads the requested file. It will look for the file in the
# directory specified by a call to the yml_directory= method.
#
def load(filename)
- @yml = ::YAML.load(ERB.new(File.read("#{yml_directory}/#{filename}")).result)
+ @yml = ::YAML.load(ERB.new(File.read("#{yml_directory}/#{filename}")).result(binding))
end
-
+
+ def include_yml(filename)
+ ERB.new(IO.read("#{yml_directory}/#{filename}")).result
+ end
+
end