From 5bf9df1ebffd85604206d1baf81a5a92158a117a Mon Sep 17 00:00:00 2001 From: nopedial Date: Mon, 14 Oct 2013 11:15:12 +0200 Subject: implement fetch into output model --- lib/oxidized/output/file.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/oxidized/output/file.rb') diff --git a/lib/oxidized/output/file.rb b/lib/oxidized/output/file.rb index 66ad178..8aaae0e 100644 --- a/lib/oxidized/output/file.rb +++ b/lib/oxidized/output/file.rb @@ -25,5 +25,9 @@ class OxFile < Output open(file, 'w') { |fh| fh.write data } end + def fetch node + IO.readlines File.join(@cfg[:directory], node) + end + end end -- cgit v1.2.1