lib/nymphia/dsl/context.rb in nymphia-0.1.2 vs lib/nymphia/dsl/context.rb in nymphia-0.2.0

- old
+ new

@@ -35,9 +35,14 @@ path = path.to_s @context[:identity_files][name] = path end def load(load_file_path) + warn "#{caller[0]}: #load method is obsolated. Use #include_file" + include_file(load_file_path) + end + + def include_file(load_file_path) absolute_load_file_path = Pathname.new(@path).dirname.join(load_file_path) dsl_code = File.read(absolute_load_file_path) instance_eval(dsl_code, absolute_load_file_path.to_s) end