Class: SimpleHdGraph::Reader
- Inherits:
-
Object
- Object
- SimpleHdGraph::Reader
- Defined in:
- lib/simple-hd-graph/reader.rb
Instance Method Summary collapse
Instance Method Details
#read_dir(dir) ⇒ String
15 16 17 18 19 |
# File 'lib/simple-hd-graph/reader.rb', line 15 def read_dir(dir) Dir.glob("#{dir}/**/*.{yml,yaml}").map { |file| read_file(file) }.join("---\n") end |
#read_file(file) ⇒ String
7 8 9 |
# File 'lib/simple-hd-graph/reader.rb', line 7 def read_file(file) File.read(file) end |